Package com.logicaldoc.impex.dao
Interface ArchiveDAO
- All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<Archive>
- All Known Implementing Classes:
HibernateArchiveDAO
DAO for Archives handling.
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionfindArchivedIds
(long archiveId) Retrieves the identifiers of all versions archived into an archivefindByMode
(int mode, Long tenantId) Retrieves all the archive with the given modefindByModeAndName
(int mode, String name, Long tenantId) Retrieves all the archive with the given mode and the given namefindByModeAndStatus
(int mode, int status, Long tenantId) Retrieves all the archive with the given mode and the given statusfindByModeAndStatusAndType
(int mode, int status, int type, Long tenantId) Retrieves all the archive with the given mode and the given typefindByModeAndType
(int mode, int type, Long tenantId) Retrieves all the archive with the given mode and the given typefindByName
(String name, long tenantId) Retrieves the archive by the given namefindByStatus
(int status, Long tenantId) Retrieves all the archive with the given statusvoid
initialize
(Archive archive) Initializes lazy loaded collectionsboolean
removeVersions
(long archiveId, Long[] versionIds) Performs a bulk update removing all versions from the given archive.void
This method persists the entity object and updates the whole sizeMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
-
Method Details
-
initialize
Initializes lazy loaded collections- Specified by:
initialize
in interfacecom.logicaldoc.core.PersistentObjectDAO<Archive>
- Parameters:
archive
- The archive to be initialized
-
findByName
Retrieves the archive by the given name- Parameters:
name
- The archive nametenantId
- The tenant of the archive- Returns:
- The archive with the given name
-
findByStatus
Retrieves all the archive with the given status- Parameters:
status
- The archive statustenantId
- The archive tenant- Returns:
- A list of archives with the given status
-
store
This method persists the entity object and updates the whole size- Parameters:
entity
- entity to be stored.updateSize
- true if you want to update archive total size- Throws:
com.logicaldoc.core.PersistenceException
- error at data layer
-
findArchivedIds
Retrieves the identifiers of all versions archived into an archive- Parameters:
archiveId
- the archive ID- Returns:
- list of identifiers
-
findByMode
Retrieves all the archive with the given mode- Parameters:
mode
- The archive modetenantId
- The archive tenant- Returns:
- A list of archives with the given mode
-
findByModeAndStatus
Retrieves all the archive with the given mode and the given status- Parameters:
mode
- The archive modestatus
- The archive statustenantId
- The archive tenant- Returns:
- A list of archives with the given mode and the given status ordered by creation date descending
-
findByModeAndName
Retrieves all the archive with the given mode and the given name- Parameters:
mode
- The archive modename
- The archive nametenantId
- The archive tenant- Returns:
- A list of archives with the given mode and the given name
-
removeVersions
Performs a bulk update removing all versions from the given archive. The export status of the involved documents is set to UNLOCKED.- Parameters:
archiveId
- The archive identifierversionIds
- The array of version ids to be removed- Returns:
- if the versions were correctly removed
-
findByModeAndType
Retrieves all the archive with the given mode and the given type- Parameters:
mode
- The archive modetype
- The archive typetenantId
- The archive tenant- Returns:
- A list of archives with the given mode and the given type ordered by creation date descending
-
findByModeAndStatusAndType
Retrieves all the archive with the given mode and the given type- Parameters:
mode
- The archive modestatus
- The archive statustype
- The archive typetenantId
- The archive tenant- Returns:
- A list of archives with the given mode, the given status and the given type ordered by creation date descending
-