Class PostfachDao

    • Constructor Detail

      • PostfachDao

        public PostfachDao()
        Creates a new instance of this DAO. Normally you should use the singleton instance provided by DaoProvider.POSTFACH_DAO.
    • Method Detail

      • getEntityRefs

        public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs​(IEntityContext ec,
                                                                           Postfach inbox)
        Description copied from interface: IGenericDao
        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.
        Specified by:
        getEntityRefs in interface IGenericDao<Postfach>
        Overrides:
        getEntityRefs in class GenericDao<Postfach>
        Parameters:
        ec - entity context for database transactions.
        inbox - to get references for.
        Returns:
        a set of entities that reference the given entity and depend on it.
      • getAllByClient

        public List<Postfach> getAllByClient​(IEntityContext ec,
                                             Mandant client)
        Description copied from interface: IPostfachDao
        Returns all inboxes of the given client.
        Specified by:
        getAllByClient in interface IPostfachDao
        Parameters:
        ec - Entity context to use for interacting with the database.
        client - Client context in which to look for inbox
        Returns:
        A list of inboxes of the given client
      • getByUUID

        public Postfach getByUUID​(IEntityContext ec,
                                  Mandant client,
                                  String uuid)
        Description copied from interface: IPostfachDao
        Returns the inbox with the given UUID
        Specified by:
        getByUUID in interface IPostfachDao
        Parameters:
        ec - Entity context to use for interacting with the database.
        client - Client context in which to look for inbox
        uuid - UUID of the inbox
        Returns:
        The inbox with the given UUID and client, if such an inbox exists.
      • getByUUID

        public Postfach getByUUID​(IEntityContext ec,
                                  Mandant client,
                                  UUID uuid)
        Description copied from interface: IPostfachDao
        Returns the inbox with the given UUID
        Specified by:
        getByUUID in interface IPostfachDao
        Parameters:
        ec - Entity context to use for interacting with the database.
        client - Client context in which to look for inbox
        uuid - UUID UUID of the inbox
        Returns:
        The inbox with the given UUID and client, if such an inbox exists.
      • findUniqueName

        public String findUniqueName​(IEntityContext ec,
                                     Mandant client,
                                     String candidate,
                                     Postfach exclude)
        Description copied from interface: IPostfachDao
        Returns a name that is not taken by another Postfach in the given client other than the excluded inbox. An index will be added to the candidate if necessary.
        Specified by:
        findUniqueName in interface IPostfachDao
        Parameters:
        ec - Entity context to use for interacting with the database.
        client - Client for which a unique inbox name should be generated
        candidate - Inbox name candidate to be made unique
        exclude - Inbox to be excluded from search
        Returns:
        unique inbox name in the context of the given client
      • isNameExisiting

        public boolean isNameExisiting​(IEntityContext ec,
                                       Mandant client,
                                       String name)
        Description copied from interface: IPostfachDao
        Returns whether or not the given inbox name exists within the given client
        Specified by:
        isNameExisiting in interface IPostfachDao
        Parameters:
        ec - Entity context to use for interacting with the database.
        client - Client context in which to look for inbox
        name - An inbox name to check
        Returns:
        whether or not the given name is unique