java.lang.Object
io.ebeaninternal.server.expression.DefaultExpressionList<T>
- All Implemented Interfaces:
Expression,ExpressionList<T>,SpiExpression,SpiExpressionList<T>
- Direct Known Subclasses:
FilterExpressionList
Default implementation of ExpressionList.
-
Field Summary
FieldsFields inherited from interface io.ebeaninternal.api.SpiExpression
SQL_FALSE, SQL_TRUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultExpressionList(Query<T> query, ExpressionList<T> parentExprList) -
Method Summary
Modifier and TypeMethodDescriptionadd(Expression expr) addAll(ExpressionList<T> exprList) voidaddBindValues(SpiExpressionBind request) Add the parameter values to be set against query.voidaddSql(SpiExpressionRequest request) Add some sql to the query.and()and(Expression expOne, Expression expTwo) arrayContains(String propertyName, Object... elementValue) arrayIsEmpty(String propertyName) arrayIsNotEmpty(String propertyName) arrayNotContains(String propertyName, Object... values) <D> DtoQuery<D> asUpdate()betweenProperties(String lowProperty, String highProperty, Object value) bitwiseAll(String propertyName, long flags) bitwiseAnd(String propertyName, long flags, long match) bitwiseAny(String propertyName, long flags) bitwiseNot(String propertyName, long flags) clear()voidcontainsMany(BeanDescriptor<?> desc, ManyWhereJoins whereManyJoins) Return true if one of the expressions is related to a Many property.Return a copy of the expression list.Return a copy of the expression for use in the query plan key.intdelete()intdelete(Transaction transaction) endAnd()endNot()endOr()eqIfPresent(String propertyName, Object value) eqSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) exampleLike(Object example) booleanexists()filterMany(String manyProperty) filterManyRaw(String manyProperty, String rawExpression, Object... params) intvoidvoidvoidfindEachWhile(Predicate<T> consumer) <A> List<A> findIds()findList()findMap()findOne()findSet()<A> List<A> <A> Set<A> findVersionsBetween(Timestamp start, Timestamp end) geIfPresent(String propertyName, Object value) geSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) getIdEqualTo(String idName) Return the bind Id value if this is a "equal to" expression for the id property.gtIfPresent(String propertyName, Object value) gtSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) having()idIn(Collection<?> idCollection) iexampleLike(Object example) in(String propertyName, Collection<?> values) inOrEmpty(String propertyName, Collection<?> values) inRangeWith(String lowProperty, String highProperty, Object value) inRangeWithProperties(String propertyName, String lowProperty, String highProperty) inSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) booleanisEmpty()Return true if this list is empty.isNotEmpty(String propertyName) booleanisSameByBind(SpiExpression other) Return true if the expression is the same with respect to bind values.istartsWith(String propertyName, String value) jsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) Between - for the given path in a JSON document.jsonEqualTo(String propertyName, String path, Object value) Equal to expression for the value at the given path in the JSON document.jsonExists(String propertyName, String path) Path exists - for the given path in a JSON document.jsonGreaterOrEqual(String propertyName, String path, Object val) Greater than or equal to - for the given path in a JSON document.jsonGreaterThan(String propertyName, String path, Object val) Greater than - for the given path in a JSON document.jsonLessOrEqualTo(String propertyName, String path, Object val) Less than or equal to - for the given path in a JSON document.jsonLessThan(String propertyName, String path, Object val) Less than - for the given path in a JSON document.jsonNotEqualTo(String propertyName, String path, Object val) Not Equal to - for the given path in a JSON document.jsonNotExists(String propertyName, String path) Path does not exist - for the given path in a JSON document.junction(Junction.Type type) leIfPresent(String propertyName, Object value) leSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) ltIfPresent(String propertyName, Object value) ltSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) booleannaturalKey(NaturalKeyQueryData<?> data) Check for match to a natural key query returning false if it doesn't match.neSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) not()not(Expression exp) notIn(String propertyName, Collection<?> values) notInSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) or()or(Expression expOne, Expression expTwo) orderBy()orderById(boolean orderById) voidprefixProperty(String path) Apply property prefix when filterMany expressions included into main query.voidprepareExpression(BeanQueryRequest<?> request) Prepare the expression.query()voidBuild the key for bind values of the query.voidqueryPlanHash(StringBuilder builder) Calculate a hash based on the expressions but excluding the actual bind values.rawOrEmpty(String raw, Collection<?> values) select(FetchGroup<T> fetchGroup) setBeanCacheMode(CacheMode useCache) setCountDistinct(CountDistinctOrder orderBy) setDisableLazyLoading(boolean disableLazyLoading) setDistinct(boolean distinct) setFirstRow(int firstRow) setMaxRows(int maxRows) voidsetUnderlying(List<SpiExpression> groupedByNesting) Replace the underlying expression list with one organised by nested path.setUseCache(boolean useCache) setUseQueryCache(CacheMode useCache) voidsimplify()Simplify nested expressions if possible.startsWith(String propertyName, String value) Return the expression list as a Junction (for ElasticSearch).trimPath(int prefixTrim) Return a copy of the ExpressionList with the path trimmed for filterMany() expressions.Return the underlying list of expressions.intupdate()intupdate(Transaction transaction) usingConnection(Connection connection) usingTransaction(Transaction transaction) voidvalidate(SpiExpressionValidation validation) Validate all the properties/paths associated with this expression.where()withLock(Query.LockType lockType) withLock(Query.LockType lockType, Query.LockWait lockWait) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.ebean.ExpressionList
findSingleAttribute, isIn, isIn, isIn, order, order, setUseQueryCacheMethods inherited from interface io.ebeaninternal.api.SpiExpression
copyMethods inherited from interface io.ebeaninternal.api.SpiExpressionList
applyRowLimits
-
Field Details
-
list
-
query
-
expr
-
-
Constructor Details
-
DefaultExpressionList
-
DefaultExpressionList
-
-
Method Details
-
prefixProperty
Description copied from interface:SpiExpressionApply property prefix when filterMany expressions included into main query.- Specified by:
prefixPropertyin interfaceSpiExpression
-
toJunction
Description copied from interface:SpiExpressionListReturn the expression list as a Junction (for ElasticSearch).- Specified by:
toJunctionin interfaceSpiExpressionList<T>
-
naturalKey
Description copied from interface:SpiExpressionCheck for match to a natural key query returning false if it doesn't match.- Specified by:
naturalKeyin interfaceSpiExpression
-
simplify
public void simplify()Description copied from interface:SpiExpressionSimplify nested expressions if possible.- Specified by:
simplifyin interfaceSpiExpression
-
trimPath
Description copied from interface:SpiExpressionListReturn a copy of the ExpressionList with the path trimmed for filterMany() expressions.- Specified by:
trimPathin interfaceSpiExpressionList<T>
-
internalList
-
copy
Return a copy of the expression list. -
copyForPlanKey
Description copied from interface:SpiExpressionReturn a copy of the expression for use in the query plan key.- Specified by:
copyForPlanKeyin interfaceSpiExpression
-
getIdEqualTo
Description copied from interface:SpiExpressionReturn the bind Id value if this is a "equal to" expression for the id property.- Specified by:
getIdEqualToin interfaceSpiExpression
-
containsMany
Return true if one of the expressions is related to a Many property.- Specified by:
containsManyin interfaceSpiExpression
-
validate
Description copied from interface:SpiExpressionValidate all the properties/paths associated with this expression.- Specified by:
validatein interfaceSpiExpression
-
query
- Specified by:
queryin interfaceExpressionList<T>
-
asOf
- Specified by:
asOfin interfaceExpressionList<T>
-
asDto
- Specified by:
asDtoin interfaceExpressionList<T>
-
asUpdate
- Specified by:
asUpdatein interfaceExpressionList<T>
-
setIncludeSoftDeletes
- Specified by:
setIncludeSoftDeletesin interfaceExpressionList<T>
-
findVersions
- Specified by:
findVersionsin interfaceExpressionList<T>
-
findVersionsBetween
- Specified by:
findVersionsBetweenin interfaceExpressionList<T>
-
where
- Specified by:
wherein interfaceExpressionList<T>
-
orderBy
- Specified by:
orderByin interfaceExpressionList<T>
-
orderBy
- Specified by:
orderByin interfaceExpressionList<T>
-
orderById
- Specified by:
orderByIdin interfaceExpressionList<T>
-
apply
- Specified by:
applyin interfaceExpressionList<T>
-
usingTransaction
- Specified by:
usingTransactionin interfaceExpressionList<T>
-
usingConnection
- Specified by:
usingConnectionin interfaceExpressionList<T>
-
delete
public int delete()- Specified by:
deletein interfaceExpressionList<T>
-
delete
- Specified by:
deletein interfaceExpressionList<T>
-
update
public int update()- Specified by:
updatein interfaceExpressionList<T>
-
update
- Specified by:
updatein interfaceExpressionList<T>
-
findFutureIds
- Specified by:
findFutureIdsin interfaceExpressionList<T>
-
findFutureCount
- Specified by:
findFutureCountin interfaceExpressionList<T>
-
findFutureList
- Specified by:
findFutureListin interfaceExpressionList<T>
-
findPagedList
- Specified by:
findPagedListin interfaceExpressionList<T>
-
findCount
public int findCount()- Specified by:
findCountin interfaceExpressionList<T>
-
findIds
- Specified by:
findIdsin interfaceExpressionList<T>
-
findIterate
- Specified by:
findIteratein interfaceExpressionList<T>
-
findEach
- Specified by:
findEachin interfaceExpressionList<T>
-
findEach
- Specified by:
findEachin interfaceExpressionList<T>
-
findEachWhile
- Specified by:
findEachWhilein interfaceExpressionList<T>
-
findList
- Specified by:
findListin interfaceExpressionList<T>
-
findSet
- Specified by:
findSetin interfaceExpressionList<T>
-
findMap
- Specified by:
findMapin interfaceExpressionList<T>
-
findSingleAttributeList
- Specified by:
findSingleAttributeListin interfaceExpressionList<T>
-
findSingleAttributeSet
- Specified by:
findSingleAttributeSetin interfaceExpressionList<T>
-
exists
public boolean exists()- Specified by:
existsin interfaceExpressionList<T>
-
findOne
- Specified by:
findOnein interfaceExpressionList<T>
-
findOneOrEmpty
- Specified by:
findOneOrEmptyin interfaceExpressionList<T>
-
filterMany
- Specified by:
filterManyin interfaceExpressionList<T>
-
filterManyRaw
- Specified by:
filterManyRawin interfaceExpressionList<T>
-
withLock
- Specified by:
withLockin interfaceExpressionList<T>
-
withLock
- Specified by:
withLockin interfaceExpressionList<T>
-
forUpdate
- Specified by:
forUpdatein interfaceExpressionList<T>
-
forUpdateNoWait
- Specified by:
forUpdateNoWaitin interfaceExpressionList<T>
-
forUpdateSkipLocked
- Specified by:
forUpdateSkipLockedin interfaceExpressionList<T>
-
select
- Specified by:
selectin interfaceExpressionList<T>
-
select
- Specified by:
selectin interfaceExpressionList<T>
-
setDistinct
- Specified by:
setDistinctin interfaceExpressionList<T>
-
setFirstRow
- Specified by:
setFirstRowin interfaceExpressionList<T>
-
setMaxRows
- Specified by:
setMaxRowsin interfaceExpressionList<T>
-
setMapKey
- Specified by:
setMapKeyin interfaceExpressionList<T>
-
setUseCache
- Specified by:
setUseCachein interfaceExpressionList<T>
-
setBeanCacheMode
- Specified by:
setBeanCacheModein interfaceExpressionList<T>
-
setUseQueryCache
- Specified by:
setUseQueryCachein interfaceExpressionList<T>
-
setCountDistinct
- Specified by:
setCountDistinctin interfaceExpressionList<T>
-
setDisableLazyLoading
- Specified by:
setDisableLazyLoadingin interfaceExpressionList<T>
-
setLabel
- Specified by:
setLabelin interfaceExpressionList<T>
-
having
- Specified by:
havingin interfaceExpressionList<T>
-
add
- Specified by:
addin interfaceExpressionList<T>
-
addAll
- Specified by:
addAllin interfaceExpressionList<T>
-
underlyingList
Description copied from interface:SpiExpressionListReturn the underlying list of expressions.- Specified by:
underlyingListin interfaceSpiExpressionList<T>
-
isEmpty
public boolean isEmpty()Description copied from interface:SpiExpressionListReturn true if this list is empty.- Specified by:
isEmptyin interfaceSpiExpressionList<T>
-
addSql
Description copied from interface:SpiExpressionAdd some sql to the query.This will contain ? as a place holder for each associated bind values.
The 'sql' added to the query can contain object property names rather than db tables and columns. This 'sql' is later parsed converting the logical property names to their full database column names.
- Specified by:
addSqlin interfaceSpiExpression- Parameters:
request- the associated request.
-
addBindValues
Description copied from interface:SpiExpressionAdd the parameter values to be set against query. For each ? place holder there should be a corresponding value that is added to the bindList.- Specified by:
addBindValuesin interfaceSpiExpression- Parameters:
request- the associated request.
-
prepareExpression
Description copied from interface:SpiExpressionPrepare the expression. For example, compile sub-query expressions etc.- Specified by:
prepareExpressionin interfaceSpiExpression
-
queryPlanHash
Calculate a hash based on the expressions but excluding the actual bind values.- Specified by:
queryPlanHashin interfaceSpiExpression
-
queryBindKey
Description copied from interface:SpiExpressionBuild the key for bind values of the query.- Specified by:
queryBindKeyin interfaceSpiExpression
-
isSameByBind
Description copied from interface:SpiExpressionReturn true if the expression is the same with respect to bind values.- Specified by:
isSameByBindin interfaceSpiExpression
-
jsonExists
Path exists - for the given path in a JSON document.- Specified by:
jsonExistsin interfaceExpressionList<T>
-
jsonNotExists
Path does not exist - for the given path in a JSON document.- Specified by:
jsonNotExistsin interfaceExpressionList<T>
-
jsonEqualTo
Equal to expression for the value at the given path in the JSON document.- Specified by:
jsonEqualToin interfaceExpressionList<T>
-
jsonNotEqualTo
Not Equal to - for the given path in a JSON document.- Specified by:
jsonNotEqualToin interfaceExpressionList<T>
-
jsonGreaterThan
Greater than - for the given path in a JSON document.- Specified by:
jsonGreaterThanin interfaceExpressionList<T>
-
jsonGreaterOrEqual
Greater than or equal to - for the given path in a JSON document.- Specified by:
jsonGreaterOrEqualin interfaceExpressionList<T>
-
jsonLessThan
Less than - for the given path in a JSON document.- Specified by:
jsonLessThanin interfaceExpressionList<T>
-
jsonLessOrEqualTo
Less than or equal to - for the given path in a JSON document.- Specified by:
jsonLessOrEqualToin interfaceExpressionList<T>
-
jsonBetween
public ExpressionList<T> jsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) Between - for the given path in a JSON document.- Specified by:
jsonBetweenin interfaceExpressionList<T>
-
bitwiseAny
- Specified by:
bitwiseAnyin interfaceExpressionList<T>
-
bitwiseNot
- Specified by:
bitwiseNotin interfaceExpressionList<T>
-
bitwiseAll
- Specified by:
bitwiseAllin interfaceExpressionList<T>
-
bitwiseAnd
- Specified by:
bitwiseAndin interfaceExpressionList<T>
-
eq
- Specified by:
eqin interfaceExpressionList<T>
-
eq
- Specified by:
eqin interfaceExpressionList<T>
-
eqIfPresent
- Specified by:
eqIfPresentin interfaceExpressionList<T>
-
eqOrNull
- Specified by:
eqOrNullin interfaceExpressionList<T>
-
ieq
- Specified by:
ieqin interfaceExpressionList<T>
-
ine
- Specified by:
inein interfaceExpressionList<T>
-
ne
- Specified by:
nein interfaceExpressionList<T>
-
ne
- Specified by:
nein interfaceExpressionList<T>
-
allEq
- Specified by:
allEqin interfaceExpressionList<T>
-
and
- Specified by:
andin interfaceExpressionList<T>
-
inRangeWith
- Specified by:
inRangeWithin interfaceExpressionList<T>
-
inRangeWithProperties
public ExpressionList<T> inRangeWithProperties(String propertyName, String lowProperty, String highProperty) - Specified by:
inRangeWithPropertiesin interfaceExpressionList<T>
-
inRange
- Specified by:
inRangein interfaceExpressionList<T>
-
between
- Specified by:
betweenin interfaceExpressionList<T>
-
betweenProperties
- Specified by:
betweenPropertiesin interfaceExpressionList<T>
-
contains
- Specified by:
containsin interfaceExpressionList<T>
-
endsWith
- Specified by:
endsWithin interfaceExpressionList<T>
-
ge
- Specified by:
gein interfaceExpressionList<T>
-
ge
- Specified by:
gein interfaceExpressionList<T>
-
gt
- Specified by:
gtin interfaceExpressionList<T>
-
gt
- Specified by:
gtin interfaceExpressionList<T>
-
gtOrNull
- Specified by:
gtOrNullin interfaceExpressionList<T>
-
geOrNull
- Specified by:
geOrNullin interfaceExpressionList<T>
-
gtIfPresent
- Specified by:
gtIfPresentin interfaceExpressionList<T>
-
geIfPresent
- Specified by:
geIfPresentin interfaceExpressionList<T>
-
icontains
- Specified by:
icontainsin interfaceExpressionList<T>
-
idIn
- Specified by:
idInin interfaceExpressionList<T>
-
idIn
- Specified by:
idInin interfaceExpressionList<T>
-
idEq
- Specified by:
idEqin interfaceExpressionList<T>
-
iendsWith
- Specified by:
iendsWithin interfaceExpressionList<T>
-
ilike
- Specified by:
ilikein interfaceExpressionList<T>
-
inPairs
- Specified by:
inPairsin interfaceExpressionList<T>
-
inTuples
- Specified by:
inTuplesin interfaceExpressionList<T>
-
exists
- Specified by:
existsin interfaceExpressionList<T>
-
notExists
- Specified by:
notExistsin interfaceExpressionList<T>
-
inSubQuery
- Specified by:
inSubQueryin interfaceExpressionList<T>
-
notInSubQuery
public ExpressionList<T> notInSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) - Specified by:
notInSubQueryin interfaceExpressionList<T>
-
eqSubQuery
- Specified by:
eqSubQueryin interfaceExpressionList<T>
-
neSubQuery
- Specified by:
neSubQueryin interfaceExpressionList<T>
-
gtSubQuery
- Specified by:
gtSubQueryin interfaceExpressionList<T>
-
geSubQuery
- Specified by:
geSubQueryin interfaceExpressionList<T>
-
ltSubQuery
- Specified by:
ltSubQueryin interfaceExpressionList<T>
-
leSubQuery
- Specified by:
leSubQueryin interfaceExpressionList<T>
-
in
- Specified by:
inin interfaceExpressionList<T>
-
in
- Specified by:
inin interfaceExpressionList<T>
-
inOrEmpty
- Specified by:
inOrEmptyin interfaceExpressionList<T>
-
in
- Specified by:
inin interfaceExpressionList<T>
-
notIn
- Specified by:
notInin interfaceExpressionList<T>
-
notIn
- Specified by:
notInin interfaceExpressionList<T>
-
notIn
- Specified by:
notInin interfaceExpressionList<T>
-
isEmpty
- Specified by:
isEmptyin interfaceExpressionList<T>
-
isNotEmpty
- Specified by:
isNotEmptyin interfaceExpressionList<T>
-
exists
- Specified by:
existsin interfaceExpressionList<T>
-
notExists
- Specified by:
notExistsin interfaceExpressionList<T>
-
isNotNull
- Specified by:
isNotNullin interfaceExpressionList<T>
-
isNull
- Specified by:
isNullin interfaceExpressionList<T>
-
istartsWith
- Specified by:
istartsWithin interfaceExpressionList<T>
-
le
- Specified by:
lein interfaceExpressionList<T>
-
le
- Specified by:
lein interfaceExpressionList<T>
-
exampleLike
- Specified by:
exampleLikein interfaceExpressionList<T>
-
iexampleLike
- Specified by:
iexampleLikein interfaceExpressionList<T>
-
like
- Specified by:
likein interfaceExpressionList<T>
-
lt
- Specified by:
ltin interfaceExpressionList<T>
-
lt
- Specified by:
ltin interfaceExpressionList<T>
-
ltOrNull
- Specified by:
ltOrNullin interfaceExpressionList<T>
-
leOrNull
- Specified by:
leOrNullin interfaceExpressionList<T>
-
ltIfPresent
- Specified by:
ltIfPresentin interfaceExpressionList<T>
-
leIfPresent
- Specified by:
leIfPresentin interfaceExpressionList<T>
-
not
- Specified by:
notin interfaceExpressionList<T>
-
or
- Specified by:
orin interfaceExpressionList<T>
-
arrayContains
- Specified by:
arrayContainsin interfaceExpressionList<T>
-
arrayNotContains
- Specified by:
arrayNotContainsin interfaceExpressionList<T>
-
arrayIsEmpty
- Specified by:
arrayIsEmptyin interfaceExpressionList<T>
-
arrayIsNotEmpty
- Specified by:
arrayIsNotEmptyin interfaceExpressionList<T>
-
raw
- Specified by:
rawin interfaceExpressionList<T>
-
raw
- Specified by:
rawin interfaceExpressionList<T>
-
raw
- Specified by:
rawin interfaceExpressionList<T>
-
rawOrEmpty
- Specified by:
rawOrEmptyin interfaceExpressionList<T>
-
startsWith
- Specified by:
startsWithin interfaceExpressionList<T>
-
junction
-
endJunction
- Specified by:
endJunctionin interfaceExpressionList<T>
-
endAnd
- Specified by:
endAndin interfaceExpressionList<T>
-
endOr
- Specified by:
endOrin interfaceExpressionList<T>
-
endNot
- Specified by:
endNotin interfaceExpressionList<T>
-
and
- Specified by:
andin interfaceExpressionList<T>
-
or
- Specified by:
orin interfaceExpressionList<T>
-
not
- Specified by:
notin interfaceExpressionList<T>
-
conjunction
- Specified by:
conjunctionin interfaceExpressionList<T>
-
disjunction
- Specified by:
disjunctionin interfaceExpressionList<T>
-
setUnderlying
Replace the underlying expression list with one organised by nested path. -
idEqualTo
-
clear
- Specified by:
clearin interfaceExpressionList<T>
-