Class CriteriaTools
- java.lang.Object
-
- org.hibernate.envers.query.criteria.internal.CriteriaTools
-
public abstract class CriteriaTools extends Object
-
-
Constructor Summary
Constructors Constructor Description CriteriaTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkPropertyNotARelation(EnversService enversService, String entityName, String propertyName)
static String
determineComponentPropertyPrefix(EnversService enversService, Map<String,String> aliasToEntityNameMap, Map<String,String> aliasToComponentPropertyNameMap, String alias)
static String
determinePropertyName(EnversService enversService, AuditReaderImplementor versionsReader, String entityName, String propertyName)
static String
determinePropertyName(EnversService enversService, AuditReaderImplementor versionsReader, String entityName, PropertyNameGetter propertyNameGetter)
static ComponentDescription
getComponent(EnversService enversService, String entityName, String propertyName)
static RelationDescription
getRelatedEntity(EnversService enversService, String entityName, String propertyName)
-
-
-
Method Detail
-
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 EnversServiceversionsReader
- 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 EnversServicealiasToEntityNameMap
- the map from aliases to entity namesaliasToComponentPropertyNameMap
- the map from aliases to component property name, if an alias is for a componentalias
- 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)
-
-