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 TypeMethodDescriptionvoid
addEntityTypeRestriction
(String alias, String entityName) Adds negated parameters, by default with the "and" connective.void
addNotNullRestriction
(String propertyName, boolean addAlias) AddsIS NOT NULL
restriction.void
addNotNullRestriction
(String alias, String propertyName) AddsIS NOT NULL
restriction.void
addNullRestriction
(String propertyName, boolean addAlias) AddsIS NULL
restriction.void
addNullRestriction
(String alias, String propertyName) AddsIS NULL
restriction.addSubParameters
(String newConnective) Adds sub-parameters with a new connective.void
void
addWhere
(String left, boolean addAlias, String op, QueryBuilder right) void
void
addWhere
(String leftAlias, String left, String op, QueryBuilder right) 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))void
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.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.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.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.void
addWhereWithNamedParam
(String left, boolean addAlias, String op, String paramName) void
addWhereWithNamedParam
(String left, String op, String paramName) void
addWhereWithParam
(String left, boolean addAlias, String op, Object paramValue) void
addWhereWithParam
(String left, String op, Object paramValue) void
addWhereWithParam
(String alias, String left, String op, Object paramValue) void
deepCopy()
-
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 NULL
restriction.- Parameters:
propertyName
- Property name.addAlias
- Positive if an alias to property name shall be added.
-
addNullRestriction
AddsIS NULL
restriction.- Parameters:
alias
- the alias which should be added to the property name.propertyName
- Property name.
-
addNotNullRestriction
AddsIS NOT NULL
restriction.- Parameters:
propertyName
- Property name.addAlias
- Positive if an alias to property name shall be added.
-
addNotNullRestriction
AddsIS NOT NULL
restriction.- 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
-