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
-
-
Field Summary
-
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
-
Constructor Summary
Constructors Constructor Description HibernateTicketDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deleteByDocId(long docId)
This method deletes all tickets of the specified document.boolean
deleteByTicketId(String ticketid)
This method deletes a download ticket.void
deleteExpired()
Deletes all expired ticketsTicket
findByTicketId(String ticketid)
This finds a ticket by its identifierDocumentDAO
getDocumentDAO()
void
setContextProperties(ContextProperties contextProperties)
void
setDocumentDAO(DocumentDAO documentDAO)
void
store(Ticket entity)
This method persists the entity objectvoid
store(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, bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, 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, bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForString
-
-
-
-
Method Detail
-
store
public void store(Ticket entity) throws PersistenceException
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
public void store(Ticket entity, DocumentHistory transaction) throws PersistenceException
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
public boolean deleteByTicketId(String ticketid)
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:
TicketDAO.deleteByTicketId(java.lang.String)
-
findByTicketId
public Ticket findByTicketId(String ticketid)
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
public void setContextProperties(ContextProperties contextProperties)
-
deleteExpired
public void deleteExpired()
Description copied from interface:TicketDAO
Deletes all expired tickets- Specified by:
deleteExpired
in interfaceTicketDAO
-
getDocumentDAO
public DocumentDAO getDocumentDAO()
-
setDocumentDAO
public void setDocumentDAO(DocumentDAO documentDAO)
-
-