Interface IGenericDao<E extends de.xima.cmn.dao.interfaces.IEntity<Long>>

All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<E,Long,IEntityContext>
All Known Subinterfaces:
IAktionDao, IAppointmentClientClosingTimeDao, IAppointmentClosingTimeDao, IAppointmentDao, IAppointmentSlotDao, IAppointmentTemplateDao, IAppointmentTypeDao, IAttachmentDao, IBedingungDao, IBenutzerDao, IBenutzerGruppeDao, IClientAuthenticatorDao, IClientAuthorizationDao<T>, IClientCounterDao, IClientPluginDao, IDatenbankZugriffDao, IDatenquelleDao, IDirectClientAuthorizationDao, IFormEingangDao, IFormElementDao, IFormRecordLockDao, IFormTemplateDao, IFormVersionBackupDao, IFormVersionDao, IFrontendServerDao, IIndirectClientAuthorizationDao, IInternalClientMessageDao, IInternalSystemMessageDao, ILDAPAbfrageDao, ILDAPGruppeDao, ILDAPZugriffDao, ILicenseFileDao, IMandantDao, IMandantDependentBaseDao<T>, IMandantFrontendServerDao, IMandantLdapDataDao, IMandantMailDataDao, IMandantRessourceDao, IModulDao, IPostfachDao, IProjectAuthenticatorConfigDao, IProjectDOIDataDao, IProjectIdentityCheckDataDao, IProjectInviteDataDao, IProjectTagDao, IProjektDao, IProjektDependentBaseDao<T>, IProjektRessourceDao, IProjektZaehlerDao, IProjektZaehlerDatenDao, IProtocolEntryClientDao, IProtocolEntryProcessDao, IProtocolEntrySystemDao, IRolleDao, IStatusDao, ISystemAuthenticatorDao, ISystemChangeDao, ISystemMessageDao, ISystemPluginDao, ISystemPropertyDao, ITextbausteinDao, IUserCredentialsDao, IUserEmailDao, IUserIdentityDao, IUserProfileDao, IUserProfileMfaDao, IVorgangDao, IWebDavAccessDao, IWorkflowElementDao<TElement>, IWorkflowNodeDao, IWorkflowNodeSearchTermDao, IWorkflowProcessDao, IWorkflowStateAuthenticatorConfigDao, IWorkflowStateDao, IWorkflowTaskDao, IWorkflowTriggerDao, IWorkflowTriggerSearchTermDao, IWorkflowVersionBackupDao, IWorkflowVersionDao
All Known Implementing Classes:
AktionDao, AppointmentClientClosingTimeDao, AppointmentClosingTimeDao, AppointmentDao, AppointmentSlotDao, AppointmentTemplateDao, AppointmentTypeDao, AttachmentDao, BedingungDao, BenutzerDao, BenutzerGruppeDao, ClientAuthenticatorDao, ClientCounterDao, ClientPluginDao, DatenbankZugriffDao, DatenquelleDao, DirectClientAuthorizationDao, FormEingangDao, FormElementDao, FormRecordLockDao, FormTemplateDao, FormVersionBackupDao, FormVersionDao, FrontendServerDao, GenericDao, IndirectClientAuthorizationDao, InternalClientMessageDao, InternalSystemMessageDao, LDAPAbfrageDao, LDAPGruppeDao, LDAPZugriffDao, LicenseFileDao, MandantDao, MandantDependentBaseDao, MandantFrontendServerDao, MandantLdapDataDao, MandantMailDataDao, MandantRessourceDao, ModulDao, PostfachDao, ProjectAuthenticatorConfigDao, ProjectDOIDataDao, ProjectIdentityCheckDataDao, ProjectInviteDataDao, ProjectTagDao, ProjektDao, ProjektDependentBaseDao, ProjektRessourceDao, ProjektZaehlerDao, ProjektZaehlerDatenDao, ProtocolEntryClientDao, ProtocolEntryProcessDao, ProtocolEntrySystemDao, RolleDao, StatusDao, SystemAuthenticatorDao, SystemChangeDao, SystemMessageDao, SystemPluginDao, SystemPropertyDao, TextbausteinDao, UserCredentialsDao, UserEmailDao, UserIdentityDao, UserProfileDao, UserProfileMfaDao, VorgangDao, WebDavAccessDao, WorkflowNodeDao, WorkflowNodeSearchTermDao, WorkflowProcessDao, WorkflowStateAuthenticatorConfigDao, WorkflowStateDao, WorkflowTaskDao, WorkflowTriggerDao, WorkflowTriggerSearchTermDao, WorkflowVersionBackupDao, WorkflowVersionDao

public interface IGenericDao<E extends de.xima.cmn.dao.interfaces.IEntity<Long>> extends de.xima.cmn.dao.interfaces.IAbstractDao<E,Long,IEntityContext>
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    count(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
    Convenience method for resultTotalCount(ec, qcm) for the very common case where you only need to specify a filter.
    default List<E>
    findAll(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
    Convenience method for all(ec, qcm) for the very common case where you only need to specify a filter.
    default E
    findSingle(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
    Convenience method for singleElement(ec, qcm) for the very common case where you only need to specify a filter.
    Set<de.xima.cmn.dao.interfaces.IEntity<Long>>
    Returns a set of entities that reference the given entity and depend on it.
     

    Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao

    all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
  • Method Details

    • read

      E read(IEntityContext ec, Integer id) throws de.xima.cmn.dao.exceptions.ReadException
      Throws:
      de.xima.cmn.dao.exceptions.ReadException
    • getEntityRefs

      Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, E entity)
      Returns a set of entities that reference the given entity and depend on it. An entity can usually not be deleted if it is still being referenced by and depended on by other entities.
      Parameters:
      ec - entity context for database transactions.
      entity - to get references for.
      Returns:
      a set of entities that reference the given entity and depend on it.
    • count

      default int count(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
      Convenience method for resultTotalCount(ec, qcm) for the very common case where you only need to specify a filter. Especially useful in combination with FilterCriterionBuilder.
       dao.count(ec, and(eq("name", "foo"), greaterOrEqual("value", 9));
       
      Parameters:
      ec - Entity context to use for accessing the database.
      filter - Filter for the entities to match. For combining multiple filters, you can use and as well as or.
      Returns:
      The number of entities matching the given filter.
      Throws:
      de.xima.cmn.dao.exceptions.ReadException - When the database could not be accessed.
    • findAll

      default List<E> findAll(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
      Convenience method for all(ec, qcm) for the very common case where you only need to specify a filter. Especially useful in combination with FilterCriterionBuilder.
       dao.allBy(ec, and(eq("name", "foo"), greaterOrEqual("value", 9));
       
      Parameters:
      ec - Entity context to use for accessing the database.
      filter - Filter for the entities to return. For combining multiple filters, you can use and as well as or.
      Returns:
      All entities matching the given filter.
      Throws:
      de.xima.cmn.dao.exceptions.ReadException - When the database could not be accessed.
    • findSingle

      default E findSingle(IEntityContext ec, de.xima.cmn.criteria.FilterCriterion filter)
      Convenience method for singleElement(ec, qcm) for the very common case where you only need to specify a filter. Especially useful in combination with FilterCriterionBuilder. For example:
       var attachment = ATTACHMENT_DAO.findSingle(ec, and(
           eq(Attachment.ATTR_VORGANG, IFormRequestContext requestCtx.getVorgang()),
           eq(Attachment.ATTR_SOURCE, EAttachmentSource.FORM_UPLOAD),
           eq(Attachment.ATTR_ELEMENT_NAME, "upl1")
       ));
       
      Parameters:
      ec - Entity context to use for accessing the database.
      filter - Filter for the entities to return. For combining multiple filters, you can use and as well as or.
      Returns:
      All entities matching the given filter.
      Throws:
      de.xima.cmn.dao.exceptions.ReadException - When the database could not be accessed.