Class Parameters
java.lang.Object
org.hibernate.envers.internal.tools.query.Parameters
Parameters of a query, built using
QueryBuilder.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntityTypeRestriction(String alias, String entityName) Adds negated parameters, by default with the "and" connective.voidaddNotNullRestriction(String propertyName, boolean addAlias) AddsIS NOT NULLrestriction.voidaddNotNullRestriction(String alias, String propertyName) AddsIS NOT NULLrestriction.voidaddNullRestriction(String propertyName, boolean addAlias) AddsIS NULLrestriction.voidaddNullRestriction(String alias, String propertyName) AddsIS NULLrestriction.addSubParameters(String newConnective) Adds sub-parameters with a new connective.voidvoidaddWhere(String left, boolean addAlias, String op, QueryBuilder right) voidvoidaddWhere(String leftAlias, String left, String op, QueryBuilder right) voidaddWhereOrNullRestriction(String left, boolean addAliasLeft, String op, String right, boolean addAliasRight) Add where clause with a null restriction: (left = right or (left is null and right is null))voidvoidaddWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String aliasLeft, String left, String op, AuditFunction function) Adds a where clause with a left (optionally aliased) property and a function call on the right side.voidaddWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction function, String op, Object value) Add where clause with a function call on the left and a scalar value on the right.voidaddWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction function, String op, String aliasRight, String right) Add a where clause with a function call on the left and an optionally aliased property on the right.voidaddWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction left, String op, AuditFunction right) Adds a where clause with a function call on both the left and right of the predicate.voidaddWhereWithNamedParam(String left, boolean addAlias, String op, String paramName) voidaddWhereWithNamedParam(String left, String op, String paramName) voidaddWhereWithParam(String left, boolean addAlias, String op, Object paramValue) voidaddWhereWithParam(String left, String op, Object paramValue) voidaddWhereWithParam(String alias, String left, String op, Object paramValue) voiddeepCopy()
-
Field Details
-
AND
- See Also:
-
OR
- See Also:
-
-
Method Details
-
deepCopy
-
addSubParameters
Adds sub-parameters with a new connective. That is, the parameters will be grouped in parentheses in the generated query, e.g.: ... and (exp1 or exp2) and ..., assuming the old connective is "and", and the new connective is "or".- Parameters:
newConnective- New connective of the parameters.- Returns:
- Sub-parameters with the given connective.
-
addNegatedParameters
Adds negated parameters, by default with the "and" connective. These paremeters will be grouped in parentheses in the generated query and negated, e.g. ... not (exp1 and exp2) ...- Returns:
- Negated sub paremters.
-
addNullRestriction
AddsIS NULLrestriction.- Parameters:
propertyName- Property name.addAlias- Positive if an alias to property name shall be added.
-
addNullRestriction
AddsIS NULLrestriction.- Parameters:
alias- the alias which should be added to the property name.propertyName- Property name.
-
addNotNullRestriction
AddsIS NOT NULLrestriction.- Parameters:
propertyName- Property name.addAlias- Positive if an alias to property name shall be added.
-
addNotNullRestriction
AddsIS NOT NULLrestriction.- Parameters:
alias- the alias which should be added to the property name.propertyName- Property name.
-
addWhere
-
addWhere
-
addWhereWithFunction
-
addWhereWithParam
-
addWhereWithParam
-
addWhereWithParam
-
addWhereWithNamedParam
-
addWhereWithNamedParam
-
addWhereWithParams
-
addWhere
-
addWhere
-
addWhereOrNullRestriction
public void addWhereOrNullRestriction(String left, boolean addAliasLeft, String op, String right, boolean addAliasRight) Add where clause with a null restriction: (left = right or (left is null and right is null))- Parameters:
left- Left property name.addAliasLeft- Whether to add the alias to the left property.op- The operator.right- Right property name.addAliasRight- Whether to add the alias to the right property.
-
addWhereWithFunction
public void addWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction function, String op, Object value) Add where clause with a function call on the left and a scalar value on the right.- Parameters:
configuration- the configuration.aliasToEntityNameMap- alias to entity name map, never nullaliasToComponentPropertyNameMap- alias to component property name map, never nullfunction- the function.op- the operator.value- the scalar value.
-
addWhereWithFunction
public void addWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction function, String op, String aliasRight, String right) Add a where clause with a function call on the left and an optionally aliased property on the right.- Parameters:
configuration- the configuration.aliasToEntityNameMap- alias to entity name map, never nullaliasToComponentPropertyNameMap- alias to component property name map, never nullfunction- the function.op- the operator.aliasRight- the optional alias of the right property, may be nullright- the property.
-
addWhereWithFunction
public void addWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String aliasLeft, String left, String op, AuditFunction function) Adds a where clause with a left (optionally aliased) property and a function call on the right side.- Parameters:
configuration- the configuration.aliasToEntityNameMap- alias to entity name map, never nullaliasToComponentPropertyNameMap- alias to component property name map, never nullaliasLeft- the optional alias of the left property, may be nullleft- the property.op- the operator.function- the function.
-
addWhereWithFunction
public void addWhereWithFunction(Configuration configuration, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, AuditFunction left, String op, AuditFunction right) Adds a where clause with a function call on both the left and right of the predicate.- Parameters:
configuration- the configuration.aliasToEntityNameMap- alias to entity name map, never nullaliasToComponentPropertyNameMap- alias to component property name map, never nullleft- the left-side function.op- the operator.right- the right-side function.
-
addEntityTypeRestriction
-