Package com.logicaldoc.core.sequence
Interface SequenceDAO
- All Superinterfaces:
- PersistentObjectDAO<Sequence>
- All Known Implementing Classes:
- HibernateSequenceDAO
Utility DAO that can manage sequences persisted in the DB
 
Important: Implementations of this interface must grant synchronization.
- Since:
- 4.0
- Author:
- Matteo Caruso - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeletes 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 name, 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 interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
- 
Method Details- 
nextReturns the next value of the sequence- Parameters:
- name- name of the sequence
- objectId- The sequence object ID
- tenantId- ID of the owning tenant
- Returns:
- The next value
 
- 
nextReturns the next value of the sequence by incrementing by the given increment- Parameters:
- name- 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
 
- 
resetInitializes the sequence value- Parameters:
- name- name of the sequence
- objectId- The sequence object ID
- value- The initial value
- tenantId- ID of the owning tenant
 
- 
deleteDeletes the sequence- Parameters:
- name- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Throws:
- PersistenceException- if a database error occurs
 
- 
findByNameFinds all sequences whose name starts with the passed name- Parameters:
- name- name of the sequence
- tenantId- identifier of the tenant
- Returns:
- collection of sequences
 
- 
findByAlternateKeyFinds the sequence by the given alternate key- Parameters:
- name- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Returns:
- the sequence object
 
- 
getCurrentValueGets the current value- Parameters:
- name- name of the sequence
- objectId- value for the objectId field
- tenantId- identifier of the tenant
- Returns:
- current value of the sequence
 
 
-