Package com.logicaldoc.stamp
Class HibernateStampDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Stamp>
com.logicaldoc.stamp.HibernateStampDAO
@Repository("stampDAO")
public class HibernateStampDAO
extends com.logicaldoc.core.HibernatePersistentObjectDAO<Stamp>
implements StampDAO
Hibernate implementation of 
StampDAO- Since:
- 7.3
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete(long stampId, int code) findByName(String name, long tenantId) Finds the stamp with the given namefindByNameAndUser(String name, long userId) Finds the stamp with the given name and userfindByUser(long userId, boolean enabledOnly) Finds the stamps for the given uservoidinitialize(Stamp stamp) booleanisReadEnable(long id, long userId) This method is looking up for read permission for a stamp and an userbooleanisWriteEnable(long id, long userId) This method is looking up for write permission for a stamp and an userMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, setSessionFactory, storeMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
deletepublic void delete(long stampId, int code) throws com.logicaldoc.core.PersistenceException 
- 
findByNameDescription copied from interface:StampDAOFinds the stamp with the given name- Specified by:
- findByNamein interface- StampDAO
- Parameters:
- name- name of the stamp
- tenantId- identifier of the tenant
- Returns:
- the found stamp
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findByUserpublic List<Stamp> findByUser(long userId, boolean enabledOnly) throws com.logicaldoc.core.PersistenceException Description copied from interface:StampDAOFinds the stamps for the given user- Specified by:
- findByUserin interface- StampDAO
- Parameters:
- userId- identifier of the user
- enabledOnly- if just the enabled stamps must be searched
- Returns:
- list of stamps
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
initialize
- 
findByNameAndUserpublic Stamp findByNameAndUser(String name, long userId) throws com.logicaldoc.core.PersistenceException Description copied from interface:StampDAOFinds the stamp with the given name and user- Specified by:
- findByNameAndUserin interface- StampDAO
- Parameters:
- name- name of the stamp
- userId- identifier of the user
- Returns:
- the found stamp
- Throws:
- com.logicaldoc.core.PersistenceException- error at data layer
 
- 
isWriteEnablepublic boolean isWriteEnable(long id, long userId) throws com.logicaldoc.core.PersistenceException Description copied from interface:StampDAOThis method is looking up for write permission for a stamp and an user- Specified by:
- isWriteEnablein interface- StampDAO
- Parameters:
- id- ID of the stamp
- userId- ID of the user
- Returns:
- id the user has write permission
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
isReadEnablepublic boolean isReadEnable(long id, long userId) throws com.logicaldoc.core.PersistenceException Description copied from interface:StampDAOThis method is looking up for read permission for a stamp and an user- Specified by:
- isReadEnablein interface- StampDAO
- Parameters:
- id- ID of the stamp
- userId- ID of the user
- Returns:
- if the user can access the stamp
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
 
-