Interface IEntityContext

  • All Superinterfaces:
    AutoCloseable, Closeable, de.xima.cmn.dao.interfaces.IBaseEntityContext
    All Known Implementing Classes:
    AEntityContext, ContextualEntityContext, EntityContext, JSFEntityContext, RequestEntityContext

    public interface IEntityContext
    extends de.xima.cmn.dao.interfaces.IBaseEntityContext
    Interface for the IEntityContext which is required for database transactions. Often you do not have to use any methods of this context yourself and just pass it to the appropriate database interaction methods as defined by the various implementations of IAbstractDao.

    In case you open this context manually, you must make sure you close it as well once you do not need it anymore. Please note that in many cases you do not have to (and should not) open this context manually, and instead use the context you are given.

    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getUser

        IUser getUser()
      • hasBenutzer

        boolean hasBenutzer()
      • reopen

        void reopen()
      • setUserContext

        void setUserContext​(UserContext uc)
      • setSkipValidation

        void setSkipValidation​(boolean skip)
      • skipValidation

        boolean skipValidation()
      • getParameter

        default <T> T getParameter​(String key,
                                   Class<T> type)
        Gets a parameter from the given parameters map, if it exists and is of the given type. Otherwise, returns null.
        Type Parameters:
        T - The type of the parameter.
        Parameters:
        key - The key of the parameter.
        type - The type of the parameter.
        Returns:
        The parameter, if it exists and is of the given type. Otherwise, null.
      • postCommit

        IEntityContext postCommit​(de.xima.cmn.dao.interfaces.IPostCommitListener listener)
      • postRollback

        IEntityContext postRollback​(de.xima.cmn.dao.interfaces.IPostRollbackListener listener)
      • preCommit

        IEntityContext preCommit​(de.xima.cmn.dao.interfaces.IPreCommitListener listener)
      • preRollback

        IEntityContext preRollback​(de.xima.cmn.dao.interfaces.IPreRollbackListener listener)
      • features

        IEntityContext features​(de.xima.cmn.dao.enums.EEntityContextFeature... features)