Package com.logicaldoc.core.sequence
Class HibernateSequenceDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Sequence>
com.logicaldoc.core.sequence.HibernateSequenceDAO
- All Implemented Interfaces:
- PersistentObjectDAO<Sequence>,- SequenceDAO
@Repository("sequenceDAO")
public class HibernateSequenceDAO
extends HibernatePersistentObjectDAO<Sequence>
implements SequenceDAO
Hibernate implementation of 
Sequences are implemented ad Generics whose type is 'sequence' and subtype is the sequence name.
SequenceDAO. Sequences are implemented ad Generics whose type is 'sequence' and subtype is the sequence name.
- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete(long id, int code) This method deletes an entity and you can give a deletion codevoidDeletes the sequencefindByAlternateKey(String name, long objectId, long tenantId) Finds the sequence by the given alternate keyfindByName(String name, long tenantId) Finds all sequences whose name starts with the passed namelonggetCurrentValue(String sequence, long objectId, long tenantId) Gets the current valuelongReturns the next value of the sequencelongReturns the next value of the sequence by incrementing by the given incrementvoidInitializes the sequence valueMethods 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, initialize, 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, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
resetDescription copied from interface:SequenceDAOInitializes the sequence value- Specified by:
- resetin interface- SequenceDAO
- Parameters:
- sequence- name of the sequence
- objectId- The sequence object ID
- tenantId- ID of the owning tenant
- value- The initial value
 
- 
nextDescription copied from interface:SequenceDAOReturns the next value of the sequence by incrementing by the given increment- Specified by:
- nextin interface- SequenceDAO
- Parameters:
- sequence- name of the sequence
- objectId- The sequence object ID
- tenantId- ID of the owning tenant
- increment- ID of the owning tenant
- Returns:
- The next value
 
- 
nextDescription copied from interface:SequenceDAOReturns the next value of the sequence- Specified by:
- nextin interface- SequenceDAO
- Parameters:
- sequence- name of the sequence
- objectId- The sequence object ID
- tenantId- ID of the owning tenant
- Returns:
- The next value
 
- 
getCurrentValueDescription copied from interface:SequenceDAOGets the current value- Specified by:
- getCurrentValuein interface- SequenceDAO
- Parameters:
- sequence- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Returns:
- current value of the sequence
 
- 
findByNameDescription copied from interface:SequenceDAOFinds all sequences whose name starts with the passed name- Specified by:
- findByNamein interface- SequenceDAO
- Parameters:
- name- name of the sequence
- tenantId- identifier of the tenant
- Returns:
- collection of sequences
 
- 
findByAlternateKeyDescription copied from interface:SequenceDAOFinds the sequence by the given alternate key- Specified by:
- findByAlternateKeyin interface- SequenceDAO
- Parameters:
- name- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Returns:
- the sequence object
 
- 
deleteDescription copied from interface:SequenceDAODeletes the sequence- Specified by:
- deletein interface- SequenceDAO
- Parameters:
- name- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Throws:
- PersistenceException- if a database error occurs
 
- 
deleteDescription copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
- deletein interface- PersistentObjectDAO<Sequence>
- Overrides:
- deletein class- HibernatePersistentObjectDAO<Sequence>
- Parameters:
- id- ID of the entity which should be deleted
- code- Deletion code
- Throws:
- PersistenceException- raised in case of errors in the database
 
 
-