Package com.logicaldoc.core.ticket
Class HibernateTicketDAO
- java.lang.Object
-
- com.logicaldoc.core.HibernatePersistentObjectDAO<Ticket>
-
- com.logicaldoc.core.ticket.HibernateTicketDAO
-
- All Implemented Interfaces:
PersistentObjectDAO<Ticket>,TicketDAO
public class HibernateTicketDAO extends HibernatePersistentObjectDAO<Ticket> implements TicketDAO
Hibernate implementation ofTicketDAO- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description HibernateTicketDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteByDocId(long docId)This method deletes all tickets of the specified document.booleandeleteByTicketId(String ticketid)This method deletes a download ticket.voiddeleteExpired()Deletes all expired ticketsTicketfindByTicketId(String ticketid)This finds a ticket by its identifierDocumentDAOgetDocumentDAO()voidsetContextProperties(ContextProperties contextProperties)voidsetDocumentDAO(DocumentDAO documentDAO)booleanstore(Ticket entity)This method persists the entity objectbooleanstore(Ticket entity, DocumentHistory transaction)This method persists the download ticket object and insert a new document history entry-
Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, 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, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString
-
-
-
-
Method Detail
-
store
public boolean store(Ticket entity)
Description copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
storein interfacePersistentObjectDAO<Ticket>- Overrides:
storein classHibernatePersistentObjectDAO<Ticket>- Parameters:
entity- entity to be stored- Returns:
- True if successfully stored in a database
-
store
public boolean store(Ticket entity, DocumentHistory transaction)
Description copied from interface:TicketDAOThis method persists the download ticket object and insert a new document history entry
-
deleteByTicketId
public boolean deleteByTicketId(String ticketid)
Description copied from interface:TicketDAOThis method deletes a download ticket.- Specified by:
deleteByTicketIdin interfaceTicketDAO- Parameters:
ticketid- ID of the ticket which should be delete.- Returns:
- if the tickets have been deleted
- See Also:
TicketDAO.deleteByTicketId(java.lang.String)
-
findByTicketId
public Ticket findByTicketId(String ticketid)
Description copied from interface:TicketDAOThis finds a ticket by its identifier- Specified by:
findByTicketIdin interfaceTicketDAO- Parameters:
ticketid- The ticket id- Returns:
- Ticket with given ticket id
-
deleteByDocId
public boolean deleteByDocId(long docId)
Description copied from interface:TicketDAOThis method deletes all tickets of the specified document.- Specified by:
deleteByDocIdin interfaceTicketDAO- Parameters:
docId- ID of the document- Returns:
- if the ticket has been deleted
-
setContextProperties
public void setContextProperties(ContextProperties contextProperties)
-
deleteExpired
public void deleteExpired()
Description copied from interface:TicketDAODeletes all expired tickets- Specified by:
deleteExpiredin interfaceTicketDAO
-
getDocumentDAO
public DocumentDAO getDocumentDAO()
-
setDocumentDAO
public void setDocumentDAO(DocumentDAO documentDAO)
-
-