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, IClientFormThemeDao, IClientPluginDao, IDatenbankZugriffDao, IDatenquelleDao, IDirectClientAuthorizationDao, IEndUserStateDao, IFormEingangDao, IFormElementDao, IFormRecordAccessDao, IFormRecordChatDao, IFormRecordLockDao, IFormRecordMessageDao, IFormRecordSubmissionDao, IFormTemplateDao, IFormVersionBackupDao, IFormVersionDao, IFrontendServerDao, IFrontendServerPropertyDao, IIndirectClientAuthorizationDao, IInternalClientMessageDao, IInternalSystemMessageDao, ILDAPAbfrageDao, ILDAPGruppeDao, ILDAPZugriffDao, ILicenseFileDao, IMandantDao, IMandantDependentBaseDao<T>, IMandantFrontendServerDao, IMandantLdapDataDao, IMandantMailDataDao, IMandantRessourceDao, IModulDao, IPostfachDao, IProjectAuthenticatorConfigDao, IProjectDOIDataDao, IProjectIdentityCheckDataDao, IProjectInviteDataDao, IProjectPortalConfigDao, IProjectPortalDataDao, IProjectPortalTagDao, IProjectTagDao, IProjektDao, IProjektDependentBaseDao<T>, IProjektRessourceDao, IProjektZaehlerDao, IProjektZaehlerDatenDao, IProtocolEntryClientDao, IProtocolEntryProcessDao, IProtocolEntrySystemDao, IRolleDao, IStatusDao, ISystemAuthenticatorDao, ISystemChangeDao, ISystemMessageDao, ISystemPluginDao, ISystemPropertyDao, ITextbausteinDao, IUserCredentialsDao, IUserEmailDao, IUserIdentityDao, IUserPortalAuthConfigDao, IUserPortalDao, 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, ClientFormThemeDao, ClientPluginDao, DatenbankZugriffDao, DatenquelleDao, DirectClientAuthorizationDao, EndUserStateDao, FormEingangDao, FormElementDao, FormRecordAccessDao, FormRecordChatDao, FormRecordLockDao, FormRecordMessageDao, FormRecordSubmissionDao, FormTemplateDao, FormVersionBackupDao, FormVersionDao, FrontendServerDao, FrontendServerPropertyDao, GenericDao, IndirectClientAuthorizationDao, InternalClientMessageDao, InternalSystemMessageDao, LDAPAbfrageDao, LDAPGruppeDao, LDAPZugriffDao, LicenseFileDao, MandantDao, MandantDependentBaseDao, MandantFrontendServerDao, MandantLdapDataDao, MandantMailDataDao, MandantRessourceDao, ModulDao, PostfachDao, ProjectAuthenticatorConfigDao, ProjectDOIDataDao, ProjectIdentityCheckDataDao, ProjectInviteDataDao, ProjectPortalConfigDao, ProjectPortalDataDao, ProjectPortalTagDao, ProjectTagDao, ProjektDao, ProjektDependentBaseDao, ProjektRessourceDao, ProjektZaehlerDao, ProjektZaehlerDatenDao, ProtocolEntryClientDao, ProtocolEntryProcessDao, ProtocolEntrySystemDao, RolleDao, StatusDao, SystemAuthenticatorDao, SystemChangeDao, SystemMessageDao, SystemPluginDao, SystemPropertyDao, TextbausteinDao, UserCredentialsDao, UserEmailDao, UserIdentityDao, UserPortalAuthConfigDao, UserPortalDao, 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 E
    Creates or updates the given entity in the database.
    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

    • 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.
    • createOrUpdate

      default E createOrUpdate(IEntityContext ec, E entity)
      Creates or updates the given entity in the database. If the entity is already persisted, it will be updated, otherwise it will be created.
      Parameters:
      ec - The entity context to use for the operation.
      entity - The entity to create or update.
      Returns:
      The created or updated entity.
    • 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.
    • 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.
    • read

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