Class CriteriaTools

java.lang.Object
org.hibernate.envers.query.criteria.internal.CriteriaTools

public abstract class CriteriaTools extends Object
  • Constructor Details

    • CriteriaTools

      public CriteriaTools()
  • Method Details

    • checkPropertyNotARelation

      public static void checkPropertyNotARelation(EnversService enversService, String entityName, String propertyName) throws AuditException
      Throws:
      AuditException
    • getRelatedEntity

      public static RelationDescription getRelatedEntity(EnversService enversService, String entityName, String propertyName) throws AuditException
      Throws:
      AuditException
    • getComponent

      public static ComponentDescription getComponent(EnversService enversService, String entityName, String propertyName)
    • determinePropertyName

      public static String determinePropertyName(EnversService enversService, AuditReaderImplementor versionsReader, String entityName, PropertyNameGetter propertyNameGetter)
    • determinePropertyName

      public static String determinePropertyName(EnversService enversService, AuditReaderImplementor versionsReader, String entityName, String propertyName)
      Parameters:
      enversService - The EnversService
      versionsReader - Versions reader.
      entityName - Original entity name (not audited).
      propertyName - Property name or placeholder.
      Returns:
      Path to property. Handles identifier placeholder used by AuditId.
    • determineComponentPropertyPrefix

      public static String determineComponentPropertyPrefix(EnversService enversService, Map<String,String> aliasToEntityNameMap, Map<String,String> aliasToComponentPropertyNameMap, String alias)
      Parameters:
      enversService - The EnversService
      aliasToEntityNameMap - the map from aliases to entity names
      aliasToComponentPropertyNameMap - the map from aliases to component property name, if an alias is for a component
      alias - the alias
      Returns:
      The prefix that has to be used when referring to a property of a component. If no prefix is required or the alias is not a component, the empty string is returned (but never null)