Class DefaultExpressionFactory
java.lang.Object
io.ebeaninternal.server.expression.DefaultExpressionFactory
- All Implemented Interfaces:
io.ebean.ExpressionFactory, SpiExpressionFactory
Default Expression factory for creating standard expressions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.ebean.ExpressionAll Equal - Map containing property names and their values.io.ebean.Expressionand(io.ebean.Expression expOne, io.ebean.Expression expTwo) And - join two expressions with a logical and.io.ebean.ExpressionarrayContains(String propertyName, Object... values) io.ebean.ExpressionarrayIsEmpty(String propertyName) io.ebean.ExpressionarrayIsNotEmpty(String propertyName) io.ebean.ExpressionarrayNotContains(String propertyName, Object... values) io.ebean.ExpressionBetween - property between the two given values.io.ebean.ExpressionbetweenProperties(String lowProperty, String highProperty, Object value) Between - value between two given properties.io.ebean.ExpressionbitwiseAll(String propertyName, long flags) io.ebean.ExpressionbitwiseAnd(String propertyName, long flags, long match) io.ebean.ExpressionbitwiseAny(String propertyName, long flags) <T> io.ebean.Junction<T> conjunction(io.ebean.Query<T> query) Return a list of expressions that will be joined by AND's.<T> io.ebean.Junction<T> conjunction(io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Return a list of expressions that will be joined by AND's.io.ebean.ExpressionContains - property like %value%.io.ebean.ExpressionFactoryCreate another expression factory with a given sub path.<T> io.ebean.Junction<T> disjunction(io.ebean.Query<T> query) Return a list of expressions that will be joined by OR's.<T> io.ebean.Junction<T> disjunction(io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Return a list of expressions that will be joined by OR's.io.ebean.ExpressionEnds With - property like %value.io.ebean.Expressionio.ebean.ExpressionEqual To - property equal to the given value.io.ebean.Expressionio.ebean.ExpressioneqSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.ExampleExpressionexampleLike(Object example) Create the query by Example expression which is case-sensitive and using LikeType.RAW (you need to add you own wildcards % and _).io.ebean.ExampleExpressionexampleLike(Object example, boolean caseInsensitive, io.ebean.LikeType likeType) Create the query by Example expression specifying more options.io.ebean.Expressionexists(io.ebean.Query<?> subQuery) Exists subqueryio.ebean.ExpressionIn - using a subQuery.<T> io.ebean.ExpressionList<T> io.ebean.Expressionio.ebean.ExpressionGreater Than or Equal to - property greater than or equal to the given value.io.ebean.Expressionio.ebean.ExpressiongeSubQuery(String propertyName, String subQuery, Object... bindValues) getLang()io.ebean.Expressionio.ebean.ExpressionGreater Than - property greater than the given value.io.ebean.ExpressionGreater Than or null - property greater than the given value or null.io.ebean.ExpressiongtSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.ExpressionCase-insensitive Contains - property like %value%.io.ebean.ExpressionId Equal to - ID property is equal to the value.io.ebean.ExpressionId IN a list of id values.io.ebean.ExpressionidIn(Collection<?> idCollection) Id IN a collection of id values.io.ebean.ExpressionCase-insensitive Ends With - property like %value.io.ebean.ExpressionCase Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).io.ebean.ExpressionCreate for named parameter use (and without support for equalsWithNullAsNoop).io.ebean.ExampleExpressioniexampleLike(Object example) Case-insensitiveexampleLike(Object)io.ebean.ExpressionCase-insensitive Like - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore).io.ebean.ExpressionIn - using a subQuery.io.ebean.ExpressionIn - property has a value in the array of values.io.ebean.Expressionin(String propertyName, Collection<?> values) In - property has a value in the collection of values.io.ebean.ExpressionCase Insensitive Equal To - property equal to the given value (typically using a lower() function to make it case-insensitive).io.ebean.ExpressionCreate for named parameter use (and without support for equalsWithNullAsNoop).io.ebean.ExpressioninOrEmpty(String propertyName, Collection<?> values) In where null or empty values means that no predicate is added to the query.io.ebean.ExpressioninPairs(io.ebean.Pairs pairs) In - property has a value in the collection of values.io.ebean.ExpressionBetween - property between the two given values.io.ebean.ExpressioninRangeWith(String lowProperty, String highProperty, Object value) io.ebean.ExpressioninRangeWithProperties(String propertyName, String lowProperty, String highProperty) io.ebean.ExpressioninSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.ExpressioninTuples(io.ebean.InTuples pairs) io.ebean.Expressionio.ebean.ExpressionisNotEmpty(String propertyName) io.ebean.ExpressionIs Not Null - property is not null.io.ebean.ExpressionIs Null - property is null.io.ebean.ExpressionistartsWith(String propertyName, String value) Case-insensitive Starts With - property like value%.io.ebean.ExpressionjsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) io.ebean.ExpressionjsonEqualTo(String propertyName, String path, Object value) io.ebean.ExpressionjsonExists(String propertyName, String path) io.ebean.ExpressionjsonGreaterOrEqual(String propertyName, String path, Object value) io.ebean.ExpressionjsonGreaterThan(String propertyName, String path, Object value) io.ebean.ExpressionjsonLessOrEqualTo(String propertyName, String path, Object value) io.ebean.ExpressionjsonLessThan(String propertyName, String path, Object value) io.ebean.ExpressionjsonNotEqualTo(String propertyName, String path, Object value) io.ebean.ExpressionjsonNotExists(String propertyName, String path) <T> io.ebean.Junction<T> junction(io.ebean.Junction.Type type, io.ebean.Query<T> query) Return a list of expressions that are wrapped by NOT.<T> io.ebean.Junction<T> junction(io.ebean.Junction.Type type, io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Create and return a Full text junction (Must, Must Not or Should).io.ebean.Expressionio.ebean.ExpressionLess Than or Equal to - property less than or equal to the given value.io.ebean.Expressionio.ebean.ExpressionleSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.Expressionio.ebean.ExpressionLike - property like value where the value contains the SQL wild card characters % (percentage) and _ (underscore).io.ebean.Expressionio.ebean.ExpressionLess Than - property less than the given value.io.ebean.ExpressionLess Than or null - property less than the given value or null.io.ebean.ExpressionltSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.Expressionio.ebean.ExpressionNot Equal To - property not equal to the given value.io.ebean.ExpressionneSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.Expressionnot(io.ebean.Expression exp) Negate the expression (prefix it with NOT).io.ebean.ExpressionnotExists(io.ebean.Query<?> subQuery) Not exists subqueryio.ebean.ExpressionIn - using a subQuery.io.ebean.ExpressionIn - using a subQuery.io.ebean.ExpressionIn - property has a value in the array of values.io.ebean.ExpressionnotIn(String propertyName, Collection<?> values) Not In - property has a value in the collection of values.io.ebean.ExpressionnotInSubQuery(String propertyName, String subQuery, Object... bindValues) io.ebean.Expressionor(io.ebean.Expression expOne, io.ebean.Expression expTwo) Or - join two expressions with a logical or.io.ebean.ExpressionAdd raw expression with no parameters.io.ebean.ExpressionAdd raw expression with a single parameter.io.ebean.ExpressionAdd raw expression with an array of parameters.io.ebean.ExpressionstartsWith(String propertyName, String value) Starts With - property like value%.
-
Constructor Details
-
DefaultExpressionFactory
public DefaultExpressionFactory(boolean equalsWithNullAsNoop, boolean nativeIlike)
-
-
Method Details
-
createExpressionFactory
public io.ebean.ExpressionFactory createExpressionFactory()Description copied from interface:SpiExpressionFactoryCreate another expression factory with a given sub path.- Specified by:
createExpressionFactoryin interfaceSpiExpressionFactory
-
getLang
-
expressionList
public <T> io.ebean.ExpressionList<T> expressionList()- Specified by:
expressionListin interfaceio.ebean.ExpressionFactory
-
jsonExists
-
jsonNotExists
-
jsonEqualTo
-
jsonNotEqualTo
-
jsonGreaterThan
-
jsonGreaterOrEqual
-
jsonLessThan
-
jsonLessOrEqualTo
-
jsonBetween
-
arrayContains
-
arrayNotContains
-
arrayIsEmpty
- Specified by:
arrayIsEmptyin interfaceio.ebean.ExpressionFactory
-
arrayIsNotEmpty
- Specified by:
arrayIsNotEmptyin interfaceio.ebean.ExpressionFactory
-
bitwiseAny
- Specified by:
bitwiseAnyin interfaceio.ebean.ExpressionFactory
-
bitwiseAll
- Specified by:
bitwiseAllin interfaceio.ebean.ExpressionFactory
-
bitwiseAnd
- Specified by:
bitwiseAndin interfaceio.ebean.ExpressionFactory
-
eq
- Specified by:
eqin interfaceio.ebean.ExpressionFactory
-
eq
-
eqOrNull
-
ne
- Specified by:
nein interfaceio.ebean.ExpressionFactory
-
ne
-
ieq
-
ine
-
ieqObject
-
ineObject
-
inRange
-
inRangeWith
-
inRangeWithProperties
-
between
-
betweenProperties
-
gt
- Specified by:
gtin interfaceio.ebean.ExpressionFactory
-
gt
-
gtOrNull
-
geOrNull
-
ge
- Specified by:
gein interfaceio.ebean.ExpressionFactory
-
ge
-
ltOrNull
-
leOrNull
-
lt
- Specified by:
ltin interfaceio.ebean.ExpressionFactory
-
lt
-
le
- Specified by:
lein interfaceio.ebean.ExpressionFactory
-
le
-
isNull
Is Null - property is null.- Specified by:
isNullin interfaceio.ebean.ExpressionFactory
-
isNotNull
Is Not Null - property is not null.- Specified by:
isNotNullin interfaceio.ebean.ExpressionFactory
-
iexampleLike
Case-insensitiveexampleLike(Object)- Specified by:
iexampleLikein interfaceio.ebean.ExpressionFactory
-
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 interfaceio.ebean.ExpressionFactory
-
exampleLike
public io.ebean.ExampleExpression exampleLike(Object example, boolean caseInsensitive, io.ebean.LikeType likeType) Create the query by Example expression specifying more options.- Specified by:
exampleLikein interfaceio.ebean.ExpressionFactory
-
like
-
like
-
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 interfaceio.ebean.ExpressionFactory
-
startsWith
-
istartsWith
-
endsWith
-
iendsWith
-
contains
-
icontains
-
inPairs
public io.ebean.Expression inPairs(io.ebean.Pairs pairs) In - property has a value in the collection of values.- Specified by:
inPairsin interfaceio.ebean.ExpressionFactory
-
inTuples
public io.ebean.Expression inTuples(io.ebean.InTuples pairs) - Specified by:
inTuplesin interfaceio.ebean.ExpressionFactory
-
in
-
exists
-
notExists
-
in
In - using a subQuery.- Specified by:
inin interfaceio.ebean.ExpressionFactory
-
inSubQuery
-
notInSubQuery
-
eqSubQuery
-
neSubQuery
-
geSubQuery
-
gtSubQuery
-
leSubQuery
-
ltSubQuery
-
in
In - property has a value in the collection of values.- Specified by:
inin interfaceio.ebean.ExpressionFactory
-
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 interfaceio.ebean.ExpressionFactory
-
notIn
-
notIn
Not In - property has a value in the collection of values.- Specified by:
notInin interfaceio.ebean.ExpressionFactory
-
notIn
In - using a subQuery.- Specified by:
notInin interfaceio.ebean.ExpressionFactory
-
exists
public io.ebean.Expression exists(io.ebean.Query<?> subQuery) Exists subquery- Specified by:
existsin interfaceio.ebean.ExpressionFactory
-
notExists
public io.ebean.Expression notExists(io.ebean.Query<?> subQuery) Not exists subquery- Specified by:
notExistsin interfaceio.ebean.ExpressionFactory
-
isEmpty
- Specified by:
isEmptyin interfaceio.ebean.ExpressionFactory
-
isNotEmpty
- Specified by:
isNotEmptyin interfaceio.ebean.ExpressionFactory
-
idEq
Id Equal to - ID property is equal to the value.- Specified by:
idEqin interfaceio.ebean.ExpressionFactory
-
idIn
Id IN a collection of id values.- Specified by:
idInin interfaceio.ebean.ExpressionFactory
-
idIn
Id IN a list of id values.- Specified by:
idInin interfaceio.ebean.ExpressionFactory
-
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 interfaceio.ebean.ExpressionFactory- Parameters:
propertyMap- a map keyed by property names.
-
raw
-
raw
-
raw
Add raw expression with no parameters.- Specified by:
rawin interfaceio.ebean.ExpressionFactory
-
and
public io.ebean.Expression and(io.ebean.Expression expOne, io.ebean.Expression expTwo) And - join two expressions with a logical and.- Specified by:
andin interfaceio.ebean.ExpressionFactory
-
or
public io.ebean.Expression or(io.ebean.Expression expOne, io.ebean.Expression expTwo) Or - join two expressions with a logical or.- Specified by:
orin interfaceio.ebean.ExpressionFactory
-
not
public io.ebean.Expression not(io.ebean.Expression exp) Negate the expression (prefix it with NOT).- Specified by:
notin interfaceio.ebean.ExpressionFactory
-
conjunction
public <T> io.ebean.Junction<T> conjunction(io.ebean.Query<T> query) Return a list of expressions that will be joined by AND's.- Specified by:
conjunctionin interfaceio.ebean.ExpressionFactory
-
disjunction
public <T> io.ebean.Junction<T> disjunction(io.ebean.Query<T> query) Return a list of expressions that will be joined by OR's.- Specified by:
disjunctionin interfaceio.ebean.ExpressionFactory
-
conjunction
public <T> io.ebean.Junction<T> conjunction(io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Return a list of expressions that will be joined by AND's.- Specified by:
conjunctionin interfaceio.ebean.ExpressionFactory
-
disjunction
public <T> io.ebean.Junction<T> disjunction(io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Return a list of expressions that will be joined by OR's.- Specified by:
disjunctionin interfaceio.ebean.ExpressionFactory
-
junction
public <T> io.ebean.Junction<T> junction(io.ebean.Junction.Type type, io.ebean.Query<T> query) Return a list of expressions that are wrapped by NOT. -
junction
public <T> io.ebean.Junction<T> junction(io.ebean.Junction.Type type, io.ebean.Query<T> query, io.ebean.ExpressionList<T> parent) Create and return a Full text junction (Must, Must Not or Should).- Specified by:
junctionin interfaceio.ebean.ExpressionFactory
-