Class HibernateEventReferenceDAO

java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<EventReference>
com.logicaldoc.calendar.HibernateEventReferenceDAO
All Implemented Interfaces:
EventReferenceDAO, com.logicaldoc.core.PersistentObjectDAO<EventReference>

public class HibernateEventReferenceDAO extends com.logicaldoc.core.HibernatePersistentObjectDAO<EventReference> implements EventReferenceDAO
Hibernate implementation of the EventReferenceDAO.
Since:
8.9.4
Author:
Marco Meschieri - LogicalDOC
  • Field Summary

    Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

    ENTITY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(long id, int code)
     
    findByAK(long userId, long eventId, String externalId)
    Finds a reference by the alternate key
    findByEvent(long eventId)
    Finds the external references to given even
    findByExternalId(String calendar, String externalId)
    Finds the external references to given external id
    findByUserAndEvent(long userId, long eventId)
    Finds the external references to given event of a given user

    Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO

    bulkUpdate, 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, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactory, store

    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, 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, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
  • Method Details

    • findByAK

      public EventReference findByAK(long userId, long eventId, String externalId) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: EventReferenceDAO
      Finds a reference by the alternate key
      Specified by:
      findByAK in interface EventReferenceDAO
      Parameters:
      userId - identifier of the user
      eventId - identifier of the event
      externalId - external identifier of the user
      Returns:
      the reference
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
    • findByUserAndEvent

      public List<EventReference> findByUserAndEvent(long userId, long eventId) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: EventReferenceDAO
      Finds the external references to given event of a given user
      Specified by:
      findByUserAndEvent in interface EventReferenceDAO
      Parameters:
      userId - identifier of the user
      eventId - identifier of the event
      Returns:
      the list of found references
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
    • delete

      public void delete(long id, int code) throws com.logicaldoc.core.PersistenceException
      Specified by:
      delete in interface com.logicaldoc.core.PersistentObjectDAO<EventReference>
      Overrides:
      delete in class com.logicaldoc.core.HibernatePersistentObjectDAO<EventReference>
      Throws:
      com.logicaldoc.core.PersistenceException
    • findByExternalId

      public List<EventReference> findByExternalId(String calendar, String externalId) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: EventReferenceDAO
      Finds the external references to given external id
      Specified by:
      findByExternalId in interface EventReferenceDAO
      Parameters:
      calendar - calendar specification
      externalId - external identifier of the event
      Returns:
      the list of found references
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
    • findByEvent

      public List<EventReference> findByEvent(long eventId) throws com.logicaldoc.core.PersistenceException
      Description copied from interface: EventReferenceDAO
      Finds the external references to given even
      Specified by:
      findByEvent in interface EventReferenceDAO
      Parameters:
      eventId - identifier of the event
      Returns:
      the list of found references
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer