Class HibernateStampDAO

  • All Implemented Interfaces:
    com.logicaldoc.core.PersistentObjectDAO<Stamp>, StampDAO

    public class HibernateStampDAO
    extends com.logicaldoc.core.HibernatePersistentObjectDAO<Stamp>
    implements StampDAO
    Hibernate implementation of StampDAO
    Since:
    7.3
    Author:
    Marco Meschieri - LogicalDOC
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean delete​(long stampId, int code)  
      Stamp findByName​(String name, long tenantId)
      Finds the stamp with the given name
      Stamp findByNameAndUser​(String name, long userId)
      Finds the stamp with the given name and user
      List<Stamp> findByUser​(long userId, boolean enabledOnly)
      Finds the stamps for the given user
      void initialize​(Stamp stamp)  
      • Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO

        bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory, store
      • Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

        bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
    • Method Detail

      • delete

        public boolean delete​(long stampId,
                              int code)
        Specified by:
        delete in interface com.logicaldoc.core.PersistentObjectDAO<Stamp>
        Overrides:
        delete in class com.logicaldoc.core.HibernatePersistentObjectDAO<Stamp>
      • findByName

        public Stamp findByName​(String name,
                                long tenantId)
        Description copied from interface: StampDAO
        Finds the stamp with the given name
        Specified by:
        findByName in interface StampDAO
        Parameters:
        name - name of the stamp
        tenantId - identifier of the tenant
        Returns:
        the found stamp
      • findByUser

        public List<Stamp> findByUser​(long userId,
                                      boolean enabledOnly)
        Description copied from interface: StampDAO
        Finds the stamps for the given user
        Specified by:
        findByUser in interface StampDAO
        Parameters:
        userId - identifier of the user
        enabledOnly - if just the enabled stamps must be searched
        Returns:
        list of stamps
      • initialize

        public void initialize​(Stamp stamp)
        Specified by:
        initialize in interface com.logicaldoc.core.PersistentObjectDAO<Stamp>
        Overrides:
        initialize in class com.logicaldoc.core.HibernatePersistentObjectDAO<Stamp>
      • findByNameAndUser

        public Stamp findByNameAndUser​(String name,
                                       long userId)
        Description copied from interface: StampDAO
        Finds the stamp with the given name and user
        Specified by:
        findByNameAndUser in interface StampDAO
        Parameters:
        name - name of the stamp
        userId - identifier of the user
        Returns:
        the found stamp