Class UserEmailDao

    • Field Summary

      • Fields inherited from class de.xima.cmn.dao.AbstractDao

        entityClass, LOG
    • Constructor Summary

      Constructors 
      Constructor Description
      UserEmailDao()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assertUserEmail​(IEntityContext ec, UserEmail email)
      Checks if the user email can be persisted (create/update).
      List<UserEmail> getByAddress​(IEntityContext ec, String address)
      Finds the user email entities with the given address.
      UserEmail getByVerifiedAddress​(IEntityContext ec, String address)
      Finds the verified user email entity with the given address.
      Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs​(IEntityContext ec, UserEmail entity)
      Returns a set of entities that reference the given entity and depend on it.
      protected IFCDaoActionHook<UserEmail> getPreActionHook()  
      • Methods inherited from class de.xima.cmn.dao.AbstractDao

        all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
      • 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
    • Constructor Detail

      • UserEmailDao

        public UserEmailDao()
    • Method Detail

      • getByAddress

        public List<UserEmail> getByAddress​(IEntityContext ec,
                                            String address)
        Description copied from interface: IUserEmailDao
        Finds the user email entities with the given address. There may be multiple user email entities with the same address. But there can only be one verified user email with the given address.
        Specified by:
        getByAddress in interface IUserEmailDao
        Parameters:
        ec - entity context for accessing the database.
        address - of the user email entity (case irrelevant).
        Returns:
        A list of user email entities with the given email address.
      • getByVerifiedAddress

        public UserEmail getByVerifiedAddress​(IEntityContext ec,
                                              String address)
        Description copied from interface: IUserEmailDao
        Finds the verified user email entity with the given address. There may only be one verified user email entity with the given address.
        Specified by:
        getByVerifiedAddress in interface IUserEmailDao
        Parameters:
        ec - entity context for accessing the database.
        address - of the verified user email entity (case irrelevant).
        Returns:
        The verified user email entity with the given email address or null.
      • getEntityRefs

        public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs​(IEntityContext ec,
                                                                           UserEmail entity)
        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<UserEmail>
        Overrides:
        getEntityRefs in class GenericDao<UserEmail>
        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.
      • assertUserEmail

        public void assertUserEmail​(IEntityContext ec,
                                    UserEmail email)
        Description copied from interface: IUserEmailDao
        Checks if the user email can be persisted (create/update). If the state of the user identity does not allow persisting than a DatabaseAccessException will be thrown.
        Specified by:
        assertUserEmail in interface IUserEmailDao
        Parameters:
        ec - entity context for accessing the database.
        email - to check.