Package com.logicaldoc.core.document
Class HibernateDocumentLinkDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<DocumentLink>
com.logicaldoc.core.document.HibernateDocumentLinkDAO
- All Implemented Interfaces:
DocumentLinkDAO
,PersistentObjectDAO<DocumentLink>
public class HibernateDocumentLinkDAO
extends HibernatePersistentObjectDAO<DocumentLink>
implements DocumentLinkDAO
Hibernate implementation of
DocumentLinkDAO
- Since:
- 4.0
- Author:
- Matteo Caruso - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long id, int code) This method deletes an entity and you can give a deletion codefindByDocId
(long docId) This method finds the list of document link in which there is a document with the given IDfindByDocId
(long docId, String type) This method finds the list of document link, filtered by the given link type, in which there is a document with the given IDfindByDocIdsAndType
(long docId1, long docId2, String type) Find a document link using its alternate keysvoid
store
(DocumentLink entity) This method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactory
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, 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, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Constructor Details
-
HibernateDocumentLinkDAO
public HibernateDocumentLinkDAO()
-
-
Method Details
-
findByDocId
Description copied from interface:DocumentLinkDAO
This method finds the list of document link in which there is a document with the given ID- Specified by:
findByDocId
in interfaceDocumentLinkDAO
- Parameters:
docId
- ID of the document- Returns:
- The list of document link
- Throws:
PersistenceException
- Error in the database
-
findByDocId
Description copied from interface:DocumentLinkDAO
This method finds the list of document link, filtered by the given link type, in which there is a document with the given ID- Specified by:
findByDocId
in interfaceDocumentLinkDAO
- Parameters:
docId
- ID of the documenttype
- Type of each document link in the return list- Returns:
- The list of document link
- Throws:
PersistenceException
- Error in the database
-
findByDocIdsAndType
public DocumentLink findByDocIdsAndType(long docId1, long docId2, String type) throws PersistenceException Description copied from interface:DocumentLinkDAO
Find a document link using its alternate keys- Specified by:
findByDocIdsAndType
in interfaceDocumentLinkDAO
- Parameters:
docId1
- identifier of the first documentdocId2
- identifier of the secondtype
- the document type(null or pdf- Returns:
- The found instance
- Throws:
PersistenceException
- Error in the database
-
delete
Description copied from interface:PersistentObjectDAO
This method deletes an entity and you can give a deletion code- Specified by:
delete
in interfacePersistentObjectDAO<DocumentLink>
- Overrides:
delete
in classHibernatePersistentObjectDAO<DocumentLink>
- Parameters:
id
- ID of the entity which should be deletedcode
- Deletion code- Throws:
PersistenceException
- raised in case of errors in the database
-
store
Description copied from interface:PersistentObjectDAO
This method persists the entity object- Specified by:
store
in interfacePersistentObjectDAO<DocumentLink>
- Overrides:
store
in classHibernatePersistentObjectDAO<DocumentLink>
- Parameters:
entity
- entity to be stored- Throws:
PersistenceException
- raised in case of errors in the database
-