Class AuditFunction

    • Constructor Detail

      • AuditFunction

        public AuditFunction​(String function,
                             List<Object> arguments)
    • Method Detail

      • getFunction

        public String getFunction()
      • getArguments

        public List<Object> getArguments()
      • eqProperty

        public AuditCriterion eqProperty​(String propertyName)
        Apply an "equal" constraint to a property
      • eqProperty

        public AuditCriterion eqProperty​(String alias,
                                         String propertyName)
        Apply an "equal" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • neProperty

        public AuditCriterion neProperty​(String propertyName)
        Apply a "not equal" constraint to a property
      • neProperty

        public AuditCriterion neProperty​(String alias,
                                         String propertyName)
        Apply a "not equal" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • ltProperty

        public AuditCriterion ltProperty​(String propertyName)
        Apply a "less than" constraint to a property
      • ltProperty

        public AuditCriterion ltProperty​(String alias,
                                         String propertyName)
        Apply a "less than" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • leProperty

        public AuditCriterion leProperty​(String propertyName)
        Apply a "less than or equal" constraint to a property
      • leProperty

        public AuditCriterion leProperty​(String alias,
                                         String propertyName)
        Apply a "less than or equal" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • gtProperty

        public AuditCriterion gtProperty​(String propertyName)
        Apply a "greater than" constraint to a property
      • gtProperty

        public AuditCriterion gtProperty​(String alias,
                                         String propertyName)
        Apply a "greater than" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • geProperty

        public AuditCriterion geProperty​(String propertyName)
        Apply a "greater than or equal" constraint to a property
      • geProperty

        public AuditCriterion geProperty​(String alias,
                                         String propertyName)
        Apply a "greater than or equal" constraint to a property
        Parameters:
        alias - the alias of the entity which owns the property.
      • leFunction

        public AuditCriterion leFunction​(AuditFunction otherFunction)
        Apply a "less than or equal" constraint to another function
      • geFunction

        public AuditCriterion geFunction​(AuditFunction otherFunction)
        Apply a "greater than or equal" constraint to another function
      • addProjectionToQuery

        public void addProjectionToQuery​(EnversService enversService,
                                         AuditReaderImplementor auditReader,
                                         Map<String,​String> aliasToEntityNameMap,
                                         Map<String,​String> aliasToComponentPropertyNameMap,
                                         String baseAlias,
                                         QueryBuilder queryBuilder)
        Description copied from interface: AuditProjection
        Adds an audit projection to the specified query.
        Specified by:
        addProjectionToQuery in interface AuditProjection
        Parameters:
        enversService - the Envers service
        auditReader - the audit reader implementor
        aliasToEntityNameMap - the entity name alias map
        baseAlias - the base alias, if one is specified; may be null
        queryBuilder - the query builder
      • convertQueryResult

        public Object convertQueryResult​(EnversService enversService,
                                         EntityInstantiator entityInstantiator,
                                         String entityName,
                                         Number revision,
                                         Object value)
        Specified by:
        convertQueryResult in interface AuditProjection
        Parameters:
        enversService - the Envers service
        entityInstantiator - the entity instantiator
        entityName - the name of the entity for which the projection has been added
        revision - the revision
        value - the value to convert
        Returns:
        the converted value
      • getAlias

        public String getAlias​(String baseAlias)
        Description copied from interface: AuditProjection
        Get the alias associated with the audit projection.
        Specified by:
        getAlias in interface AuditProjection
        Parameters:
        baseAlias - the base alias if one exists; may be null
        Returns:
        the alias