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>
@Repository("documentLinkDAO")
public class HibernateDocumentLinkDAO
extends HibernatePersistentObjectDAO<DocumentLink>
implements DocumentLinkDAO
Hibernate implementation of 
DocumentLinkDAO- Since:
- 4.0
- Author:
- Matteo Caruso - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete(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 keysvoidstore(DocumentLink entity) This method persists the entity objectMethods 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, setSessionFactoryMethods 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
- 
Constructor Details- 
HibernateDocumentLinkDAOpublic HibernateDocumentLinkDAO()
 
- 
- 
Method Details- 
findByDocIdDescription copied from interface:DocumentLinkDAOThis method finds the list of document link in which there is a document with the given ID- Specified by:
- findByDocIdin interface- DocumentLinkDAO
- Parameters:
- docId- ID of the document
- Returns:
- The list of document link
- Throws:
- PersistenceException- Error in the database
 
- 
findByDocIdDescription copied from interface:DocumentLinkDAOThis 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:
- findByDocIdin interface- DocumentLinkDAO
- Parameters:
- docId- ID of the document
- type- Type of each document link in the return list
- Returns:
- The list of document link
- Throws:
- PersistenceException- Error in the database
 
- 
findByDocIdsAndTypepublic DocumentLink findByDocIdsAndType(long docId1, long docId2, String type) throws PersistenceException Description copied from interface:DocumentLinkDAOFind a document link using its alternate keys- Specified by:
- findByDocIdsAndTypein interface- DocumentLinkDAO
- Parameters:
- docId1- identifier of the first document
- docId2- identifier of the second
- type- the document type(null or pdf
- Returns:
- The found instance
- Throws:
- PersistenceException- Error in the database
 
- 
deleteDescription copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
- deletein interface- PersistentObjectDAO<DocumentLink>
- Overrides:
- deletein class- HibernatePersistentObjectDAO<DocumentLink>
- Parameters:
- id- ID of the entity which should be deleted
- code- Deletion code
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
storeDescription copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
- storein interface- PersistentObjectDAO<DocumentLink>
- Overrides:
- storein class- HibernatePersistentObjectDAO<DocumentLink>
- Parameters:
- entity- entity to be stored
- Throws:
- PersistenceException- raised in case of errors in the database
 
 
-