java.lang.Object
io.ebeaninternal.server.expression.DefaultExpressionFactory
- All Implemented Interfaces:
ExpressionFactory,SpiExpressionFactory
Default Expression factory for creating standard expressions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAll Equal - Map containing property names and their values.and(Expression expOne, Expression expTwo) And - join two expressions with a logical and.arrayContains(String propertyName, Object... values) arrayIsEmpty(String propertyName) arrayIsNotEmpty(String propertyName) arrayNotContains(String propertyName, Object... values) Between - property between the two given values.betweenProperties(String lowProperty, String highProperty, Object value) Between - value between two given properties.bitwiseAll(String propertyName, long flags) bitwiseAnd(String propertyName, long flags, long match) bitwiseAny(String propertyName, long flags) <T> Junction<T> conjunction(Query<T> query) Return a list of expressions that will be joined by AND's.<T> Junction<T> conjunction(Query<T> query, ExpressionList<T> parent) Return a list of expressions that will be joined by AND's.Contains - property like %value%.Create another expression factory with a given sub path.<T> Junction<T> disjunction(Query<T> query) Return a list of expressions that will be joined by OR's.<T> Junction<T> disjunction(Query<T> query, ExpressionList<T> parent) Return a list of expressions that will be joined by OR's.Ends With - property like %value.Equal To - property equal to the given value.eqSubQuery(String propertyName, String subQuery, Object... bindValues) exampleLike(Object example) Create the query by Example expression which is case-sensitive and using LikeType.RAW (you need to add you own wildcards % and _).exampleLike(Object example, boolean caseInsensitive, LikeType likeType) Create the query by Example expression specifying more options.Exists subqueryIn - using a subQuery.<T> ExpressionList<T> Greater Than or Equal to - property greater than or equal to the given value.geSubQuery(String propertyName, String subQuery, Object... bindValues) getLang()Greater Than - property greater than the given value.Greater Than or null - property greater than the given value or null.gtSubQuery(String propertyName, String subQuery, Object... bindValues) Case-insensitive Contains - property like %value%.Id Equal to - ID property is equal to the value.Id IN a list of id values.idIn(Collection<?> idCollection) Id IN a collection of id values.Case-insensitive Ends With - property like %value.Case Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).Create for named parameter use (and without support for equalsWithNullAsNoop).iexampleLike(Object example) Case-insensitiveexampleLike(Object)Case-insensitive Like - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore).In - using a subQuery.In - property has a value in the array of values.in(String propertyName, Collection<?> values) In - property has a value in the collection of values.Case Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).Create for named parameter use (and without support for equalsWithNullAsNoop).inOrEmpty(String propertyName, Collection<?> values) In where null or empty values means that no predicate is added to the query.In - property has a value in the collection of values.Between - property between the two given values.inRangeWith(String lowProperty, String highProperty, Object value) inRangeWithProperties(String propertyName, String lowProperty, String highProperty) inSubQuery(String propertyName, String subQuery, Object... bindValues) isNotEmpty(String propertyName) Is Not Null - property is not null.Is Null - property is null.istartsWith(String propertyName, String value) Case-insensitive Starts With - property like value%.jsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) jsonEqualTo(String propertyName, String path, Object value) jsonExists(String propertyName, String path) jsonGreaterOrEqual(String propertyName, String path, Object value) jsonGreaterThan(String propertyName, String path, Object value) jsonLessOrEqualTo(String propertyName, String path, Object value) jsonLessThan(String propertyName, String path, Object value) jsonNotEqualTo(String propertyName, String path, Object value) jsonNotExists(String propertyName, String path) <T> Junction<T> junction(Junction.Type type, Query<T> query) Return a list of expressions that are wrapped by NOT.<T> Junction<T> junction(Junction.Type type, Query<T> query, ExpressionList<T> parent) Create and return a Full text junction (Must, Must Not or Should).Less Than or Equal to - property less than or equal to the given value.leSubQuery(String propertyName, String subQuery, Object... bindValues) Like - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore).Less Than - property less than the given value.Less Than or null - property less than the given value or null.ltSubQuery(String propertyName, String subQuery, Object... bindValues) Not Equal To - property not equal to the given value.neSubQuery(String propertyName, String subQuery, Object... bindValues) not(Expression exp) Negate the expression (prefix it with NOT).Not exists subqueryIn - using a subQuery.In - using a subQuery.In - property has a value in the array of values.notIn(String propertyName, Collection<?> values) Not In - property has a value in the collection of values.notInSubQuery(String propertyName, String subQuery, Object... bindValues) or(Expression expOne, Expression expTwo) Or - join two expressions with a logical or.Add raw expression with no parameters.Add raw expression with a single parameter.Add raw expression with an array of parameters.startsWith(String propertyName, String value) Starts With - property like value%.
-
Constructor Details
-
DefaultExpressionFactory
public DefaultExpressionFactory(boolean equalsWithNullAsNoop, boolean nativeIlike)
-
-
Method Details
-
createExpressionFactory
Description copied from interface:SpiExpressionFactoryCreate another expression factory with a given sub path.- Specified by:
createExpressionFactoryin interfaceSpiExpressionFactory
-
getLang
-
expressionList
- Specified by:
expressionListin interfaceExpressionFactory
-
jsonExists
- Specified by:
jsonExistsin interfaceExpressionFactory
-
jsonNotExists
- Specified by:
jsonNotExistsin interfaceExpressionFactory
-
jsonEqualTo
- Specified by:
jsonEqualToin interfaceExpressionFactory
-
jsonNotEqualTo
- Specified by:
jsonNotEqualToin interfaceExpressionFactory
-
jsonGreaterThan
- Specified by:
jsonGreaterThanin interfaceExpressionFactory
-
jsonGreaterOrEqual
- Specified by:
jsonGreaterOrEqualin interfaceExpressionFactory
-
jsonLessThan
- Specified by:
jsonLessThanin interfaceExpressionFactory
-
jsonLessOrEqualTo
- Specified by:
jsonLessOrEqualToin interfaceExpressionFactory
-
jsonBetween
public Expression jsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) - Specified by:
jsonBetweenin interfaceExpressionFactory
-
arrayContains
- Specified by:
arrayContainsin interfaceExpressionFactory
-
arrayNotContains
- Specified by:
arrayNotContainsin interfaceExpressionFactory
-
arrayIsEmpty
- Specified by:
arrayIsEmptyin interfaceExpressionFactory
-
arrayIsNotEmpty
- Specified by:
arrayIsNotEmptyin interfaceExpressionFactory
-
bitwiseAny
- Specified by:
bitwiseAnyin interfaceExpressionFactory
-
bitwiseAll
- Specified by:
bitwiseAllin interfaceExpressionFactory
-
bitwiseAnd
- Specified by:
bitwiseAndin interfaceExpressionFactory
-
eq
- Specified by:
eqin interfaceExpressionFactory
-
eq
Equal To - property equal to the given value.- Specified by:
eqin interfaceExpressionFactory
-
eqOrNull
- Specified by:
eqOrNullin interfaceExpressionFactory
-
ne
- Specified by:
nein interfaceExpressionFactory
-
ne
Not Equal To - property not equal to the given value.- Specified by:
nein interfaceExpressionFactory
-
ieq
Case Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).- Specified by:
ieqin interfaceExpressionFactory
-
ine
Case Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).- Specified by:
inein interfaceExpressionFactory
-
ieqObject
Create for named parameter use (and without support for equalsWithNullAsNoop).- Specified by:
ieqObjectin interfaceExpressionFactory
-
ineObject
Create for named parameter use (and without support for equalsWithNullAsNoop).- Specified by:
ineObjectin interfaceExpressionFactory
-
inRange
Between - property between the two given values.- Specified by:
inRangein interfaceExpressionFactory
-
inRangeWith
- Specified by:
inRangeWithin interfaceExpressionFactory
-
inRangeWithProperties
public Expression inRangeWithProperties(String propertyName, String lowProperty, String highProperty) - Specified by:
inRangeWithPropertiesin interfaceExpressionFactory
-
between
Between - property between the two given values.- Specified by:
betweenin interfaceExpressionFactory
-
betweenProperties
Between - value between two given properties.- Specified by:
betweenPropertiesin interfaceExpressionFactory
-
gt
- Specified by:
gtin interfaceExpressionFactory
-
gt
Greater Than - property greater than the given value.- Specified by:
gtin interfaceExpressionFactory
-
gtOrNull
Greater Than or null - property greater than the given value or null.- Specified by:
gtOrNullin interfaceExpressionFactory
-
geOrNull
- Specified by:
geOrNullin interfaceExpressionFactory
-
ge
- Specified by:
gein interfaceExpressionFactory
-
ge
Greater Than or Equal to - property greater than or equal to the given value.- Specified by:
gein interfaceExpressionFactory
-
ltOrNull
Less Than or null - property less than the given value or null.- Specified by:
ltOrNullin interfaceExpressionFactory
-
leOrNull
- Specified by:
leOrNullin interfaceExpressionFactory
-
lt
- Specified by:
ltin interfaceExpressionFactory
-
lt
Less Than - property less than the given value.- Specified by:
ltin interfaceExpressionFactory
-
le
- Specified by:
lein interfaceExpressionFactory
-
le
Less Than or Equal to - property less than or equal to the given value.- Specified by:
lein interfaceExpressionFactory
-
isNull
Is Null - property is null.- Specified by:
isNullin interfaceExpressionFactory
-
isNotNull
Is Not Null - property is not null.- Specified by:
isNotNullin interfaceExpressionFactory
-
iexampleLike
Case-insensitiveexampleLike(Object)- Specified by:
iexampleLikein interfaceExpressionFactory
-
exampleLike
Create the query by Example expression which is case-sensitive and using LikeType.RAW (you need to add you own wildcards % and _).- Specified by:
exampleLikein interfaceExpressionFactory
-
exampleLike
Create the query by Example expression specifying more options.- Specified by:
exampleLikein interfaceExpressionFactory
-
like
public Expression like(String propertyName, Object value, boolean caseInsensitive, LikeType likeType) - Specified by:
likein interfaceExpressionFactory
-
like
Like - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore).- Specified by:
likein interfaceExpressionFactory
-
ilike
Case-insensitive Like - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore). Typically, uses a lower() function to make the expression case-insensitive.- Specified by:
ilikein interfaceExpressionFactory
-
startsWith
Starts With - property like value%.- Specified by:
startsWithin interfaceExpressionFactory
-
istartsWith
Case-insensitive Starts With - property like value%. Typically, uses a lower() function to make the expression case-insensitive.- Specified by:
istartsWithin interfaceExpressionFactory
-
endsWith
Ends With - property like %value.- Specified by:
endsWithin interfaceExpressionFactory
-
iendsWith
Case-insensitive Ends With - property like %value. Typically, uses a lower() function to make the expression case-insensitive.- Specified by:
iendsWithin interfaceExpressionFactory
-
contains
Contains - property like %value%.- Specified by:
containsin interfaceExpressionFactory
-
icontains
Case-insensitive Contains - property like %value%. Typically, uses a lower() function to make the expression case-insensitive.- Specified by:
icontainsin interfaceExpressionFactory
-
inPairs
In - property has a value in the collection of values.- Specified by:
inPairsin interfaceExpressionFactory
-
inTuples
- Specified by:
inTuplesin interfaceExpressionFactory
-
in
In - property has a value in the array of values.- Specified by:
inin interfaceExpressionFactory
-
exists
In - using a subQuery.- Specified by:
existsin interfaceExpressionFactory
-
notExists
In - using a subQuery.- Specified by:
notExistsin interfaceExpressionFactory
-
in
In - using a subQuery.- Specified by:
inin interfaceExpressionFactory
-
inSubQuery
- Specified by:
inSubQueryin interfaceExpressionFactory
-
notInSubQuery
- Specified by:
notInSubQueryin interfaceExpressionFactory
-
eqSubQuery
- Specified by:
eqSubQueryin interfaceExpressionFactory
-
neSubQuery
- Specified by:
neSubQueryin interfaceExpressionFactory
-
geSubQuery
- Specified by:
geSubQueryin interfaceExpressionFactory
-
gtSubQuery
- Specified by:
gtSubQueryin interfaceExpressionFactory
-
leSubQuery
- Specified by:
leSubQueryin interfaceExpressionFactory
-
ltSubQuery
- Specified by:
ltSubQueryin interfaceExpressionFactory
-
in
In - property has a value in the collection of values.- Specified by:
inin interfaceExpressionFactory
-
inOrEmpty
In where null or empty values means that no predicate is added to the query.That is, only add the IN predicate if the values are not null or empty.
- Specified by:
inOrEmptyin interfaceExpressionFactory
-
notIn
In - property has a value in the array of values.- Specified by:
notInin interfaceExpressionFactory
-
notIn
Not In - property has a value in the collection of values.- Specified by:
notInin interfaceExpressionFactory
-
notIn
In - using a subQuery.- Specified by:
notInin interfaceExpressionFactory
-
exists
Exists subquery- Specified by:
existsin interfaceExpressionFactory
-
notExists
Not exists subquery- Specified by:
notExistsin interfaceExpressionFactory
-
isEmpty
- Specified by:
isEmptyin interfaceExpressionFactory
-
isNotEmpty
- Specified by:
isNotEmptyin interfaceExpressionFactory
-
idEq
Id Equal to - ID property is equal to the value.- Specified by:
idEqin interfaceExpressionFactory
-
idIn
Id IN a collection of id values.- Specified by:
idInin interfaceExpressionFactory
-
idIn
Id IN a list of id values.- Specified by:
idInin interfaceExpressionFactory
-
allEq
All Equal - Map containing property names and their values.Expression where all the property names in the map are equal to the corresponding value.
- Specified by:
allEqin interfaceExpressionFactory- Parameters:
propertyMap- a map keyed by property names.
-
raw
Add raw expression with a single parameter.The raw expression should contain a single ? at the location of the parameter.
- Specified by:
rawin interfaceExpressionFactory
-
raw
Add raw expression with an array of parameters.The raw expression should contain the same number of ? as there are parameters.
- Specified by:
rawin interfaceExpressionFactory
-
raw
Add raw expression with no parameters.- Specified by:
rawin interfaceExpressionFactory
-
and
And - join two expressions with a logical and.- Specified by:
andin interfaceExpressionFactory
-
or
Or - join two expressions with a logical or.- Specified by:
orin interfaceExpressionFactory
-
not
Negate the expression (prefix it with NOT).- Specified by:
notin interfaceExpressionFactory
-
conjunction
Return a list of expressions that will be joined by AND's.- Specified by:
conjunctionin interfaceExpressionFactory
-
disjunction
Return a list of expressions that will be joined by OR's.- Specified by:
disjunctionin interfaceExpressionFactory
-
conjunction
Return a list of expressions that will be joined by AND's.- Specified by:
conjunctionin interfaceExpressionFactory
-
disjunction
Return a list of expressions that will be joined by OR's.- Specified by:
disjunctionin interfaceExpressionFactory
-
junction
Return a list of expressions that are wrapped by NOT. -
junction
Create and return a Full text junction (Must, Must Not or Should).- Specified by:
junctionin interfaceExpressionFactory
-