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
Hibernate implementation of
TicketDAO
- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteByDocId
(long docId) This method deletes all tickets of the specified document.boolean
deleteByTicketId
(String ticketid) This method deletes a download ticket.void
Deletes all expired ticketsfindByTicketId
(String ticketid) This finds a ticket by its identifiervoid
setContextProperties
(ContextProperties contextProperties) void
setDocumentDAO
(DocumentDAO documentDAO) void
This method persists the entity objectvoid
store
(Ticket entity, DocumentHistory transaction) This method persists the download ticket object and insert a new document history entryMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, 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, 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, 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
-
Constructor Details
-
HibernateTicketDAO
public HibernateTicketDAO()
-
-
Method Details
-
store
Description copied from interface:PersistentObjectDAO
This method persists the entity object- Specified by:
store
in interfacePersistentObjectDAO<Ticket>
- Overrides:
store
in classHibernatePersistentObjectDAO<Ticket>
- Parameters:
entity
- entity to be stored- Throws:
PersistenceException
- raised in case of errors in the database
-
store
Description copied from interface:TicketDAO
This method persists the download ticket object and insert a new document history entry- Specified by:
store
in interfaceTicketDAO
- Parameters:
entity
- the ticket to storetransaction
- entry to log the event- Throws:
PersistenceException
- error at database level
-
deleteByTicketId
Description copied from interface:TicketDAO
This method deletes a download ticket.- Specified by:
deleteByTicketId
in interfaceTicketDAO
- Parameters:
ticketid
- ID of the ticket which should be delete.- Returns:
- if the tickets have been deleted
- See Also:
-
findByTicketId
Description copied from interface:TicketDAO
This finds a ticket by its identifier- Specified by:
findByTicketId
in interfaceTicketDAO
- Parameters:
ticketid
- The ticket id- Returns:
- Ticket with given ticket id
-
deleteByDocId
public boolean deleteByDocId(long docId) Description copied from interface:TicketDAO
This method deletes all tickets of the specified document.- Specified by:
deleteByDocId
in interfaceTicketDAO
- Parameters:
docId
- ID of the document- Returns:
- if the ticket has been deleted
-
setContextProperties
-
deleteExpired
public void deleteExpired()Description copied from interface:TicketDAO
Deletes all expired tickets- Specified by:
deleteExpired
in interfaceTicketDAO
-
getDocumentDAO
-
setDocumentDAO
-