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 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)
boolean
store(Ticket entity)
This method persists the entity objectboolean
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, 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:PersistentObjectDAO
This method persists the entity object- Specified by:
store
in interfacePersistentObjectDAO<Ticket>
- Overrides:
store
in 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:TicketDAO
This method persists the download ticket object and insert a new document history entry
-
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)
-
-