Class DefaultExpressionList<T>
java.lang.Object
io.ebeaninternal.server.expression.DefaultExpressionList<T>
- All Implemented Interfaces:
io.ebean.Expression, io.ebean.ExpressionList<T>, SpiExpression, SpiExpressionList<T>
- Direct Known Subclasses:
FilterExpressionList
Default implementation of ExpressionList.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.ebean.ExpressionFactoryprotected List<SpiExpression> protected final io.ebean.Query<T> Fields inherited from interface SpiExpression
SQL_FALSE, SQL_TRUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultExpressionList(io.ebean.ExpressionFactory expr) DefaultExpressionList(io.ebean.Query<T> query) -
Method Summary
Modifier and TypeMethodDescriptionio.ebean.ExpressionList<T> add(io.ebean.Expression expr) io.ebean.ExpressionList<T> voidaddBindValues(SpiExpressionBind request) Add the parameter values to be set against query.voidaddSql(SpiExpressionRequest request) Add some sql to the query.io.ebean.ExpressionList<T> io.ebean.Junction<T> and()io.ebean.ExpressionList<T> and(io.ebean.Expression expOne, io.ebean.Expression expTwo) io.ebean.Query<T> apply(io.ebean.FetchPath fetchPath) io.ebean.ExpressionList<T> arrayContains(String propertyName, Object... elementValue) io.ebean.ExpressionList<T> arrayIsEmpty(String propertyName) io.ebean.ExpressionList<T> arrayIsNotEmpty(String propertyName) io.ebean.ExpressionList<T> arrayNotContains(String propertyName, Object... values) <D> io.ebean.DtoQuery<D> io.ebean.Query<T> io.ebean.UpdateQuery<T> asUpdate()io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> betweenProperties(String lowProperty, String highProperty, Object value) io.ebean.ExpressionList<T> bitwiseAll(String propertyName, long flags) io.ebean.ExpressionList<T> bitwiseAnd(String propertyName, long flags, long match) io.ebean.ExpressionList<T> bitwiseAny(String propertyName, long flags) io.ebean.ExpressionList<T> bitwiseNot(String propertyName, long flags) io.ebean.ExpressionList<T> clear()io.ebean.Junction<T> io.ebean.ExpressionList<T> 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()io.ebean.Junction<T> io.ebean.ExpressionList<T> endAnd()io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> endNot()io.ebean.ExpressionList<T> endOr()io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> eqIfPresent(String propertyName, @Nullable Object value) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> eqSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.ExpressionList<T> exampleLike(Object example) booleanexists()io.ebean.ExpressionList<T> exists(io.ebean.Query<?> subQuery) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> filterMany(String manyProperty) io.ebean.ExpressionList<T> filterManyRaw(String manyProperty, String rawExpression, Object... params) intvoidvoidvoidfindEachWhile(Predicate<T> consumer) io.ebean.FutureRowCount<T> io.ebean.FutureIds<T> io.ebean.FutureList<T> <A> List<A> findIds()io.ebean.QueryIterator<T> findList()findMap()@Nullable TfindOne()io.ebean.PagedList<T> findSet()<A> List<A> <A> Set<A> findVersionsBetween(Timestamp start, Timestamp end) static <P> io.ebean.ExpressionList<P> forFetchGroup(io.ebean.Query<P> q) io.ebean.Query<T> io.ebean.Query<T> io.ebean.Query<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> geIfPresent(String propertyName, @Nullable Object value) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> 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.io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> gtIfPresent(String propertyName, @Nullable Object value) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> gtSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.ExpressionList<T> having()io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> idIn(Collection<?> idCollection) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> iexampleLike(Object example) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> in(String propertyName, Collection<?> values) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> inOrEmpty(String propertyName, Collection<?> values) io.ebean.ExpressionList<T> inPairs(io.ebean.Pairs pairs) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> inRangeWith(String lowProperty, String highProperty, Object value) io.ebean.ExpressionList<T> inRangeWithProperties(String propertyName, String lowProperty, String highProperty) io.ebean.ExpressionList<T> inSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.ExpressionList<T> inTuples(io.ebean.InTuples pairs) booleanisEmpty()Return true if this list is empty.io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> isNotEmpty(String propertyName) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> booleanisSameByBind(SpiExpression other) Return true if the expression is the same with respect to bind values.io.ebean.ExpressionList<T> istartsWith(String propertyName, String value) io.ebean.ExpressionList<T> jsonBetween(String propertyName, String path, Object lowerValue, Object upperValue) Between - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonEqualTo(String propertyName, String path, Object value) Equal to expression for the value at the given path in the JSON document.io.ebean.ExpressionList<T> jsonExists(String propertyName, String path) Path exists - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonGreaterOrEqual(String propertyName, String path, Object val) Greater than or equal to - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonGreaterThan(String propertyName, String path, Object val) Greater than - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonLessOrEqualTo(String propertyName, String path, Object val) Less than or equal to - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonLessThan(String propertyName, String path, Object val) Less than - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonNotEqualTo(String propertyName, String path, Object val) Not Equal to - for the given path in a JSON document.io.ebean.ExpressionList<T> jsonNotExists(String propertyName, String path) Path does not exist - for the given path in a JSON document.protected io.ebean.Junction<T> junction(io.ebean.Junction.Type type) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> leIfPresent(String propertyName, @Nullable Object value) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> leSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> ltIfPresent(String propertyName, @Nullable Object value) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> 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.io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> neSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.Junction<T> not()io.ebean.ExpressionList<T> not(io.ebean.Expression exp) io.ebean.ExpressionList<T> notExists(io.ebean.Query<?> subQuery) io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> notIn(String propertyName, Collection<?> values) io.ebean.ExpressionList<T> notInSubQuery(String propertyName, String sqlSubQuery, Object... bindValues) io.ebean.Junction<T> or()io.ebean.ExpressionList<T> or(io.ebean.Expression expOne, io.ebean.Expression expTwo) io.ebean.OrderBy<T> orderBy()io.ebean.ExpressionList<T> io.ebean.Query<T> orderById(boolean orderById) voidprefixProperty(String path) Apply property prefix when filterMany expressions included into main query.voidprepareExpression(io.ebean.event.BeanQueryRequest<?> request) Prepare the expression.io.ebean.Query<T> 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.io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> io.ebean.ExpressionList<T> rawOrEmpty(String raw, Collection<?> values) io.ebean.Query<T> io.ebean.Query<T> io.ebean.Query<T> setBeanCacheMode(io.ebean.CacheMode useCache) io.ebean.Query<T> setCountDistinct(io.ebean.CountDistinctOrder orderBy) io.ebean.Query<T> setDisableLazyLoading(boolean disableLazyLoading) io.ebean.Query<T> setDistinct(boolean distinct) io.ebean.ExpressionList<T> setFirstRow(int firstRow) io.ebean.Query<T> io.ebean.Query<T> io.ebean.Query<T> io.ebean.ExpressionList<T> setMaxRows(int maxRows) voidsetUnderlying(List<SpiExpression> groupedByNesting) Replace the underlying expression list with one organised by nested path.io.ebean.Query<T> setUseCache(boolean useCache) io.ebean.Query<T> setUseQueryCache(io.ebean.CacheMode useCache) voidsimplify()Simplify nested expressions if possible.io.ebean.ExpressionList<T> startsWith(String propertyName, String value) io.ebean.Junction<T> 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()io.ebean.Query<T> usingConnection(Connection connection) io.ebean.Query<T> usingTransaction(io.ebean.Transaction transaction) voidvalidate(SpiExpressionValidation validation) Validate all the properties/paths associated with this expression.io.ebean.ExpressionList<T> where()io.ebean.Query<T> withLock(io.ebean.Query.LockType lockType) io.ebean.Query<T> withLock(io.ebean.Query.LockType lockType, io.ebean.Query.LockWait lockWait) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.ebean.ExpressionList
findSingleAttribute, isIn, isIn, isIn, setUseQueryCacheMethods inherited from interface SpiExpression
copyMethods inherited from interface SpiExpressionList
applyRowLimits
-
Field Details
-
list
-
query
-
expr
protected final io.ebean.ExpressionFactory expr
-
-
Constructor Details
-
DefaultExpressionList
-
DefaultExpressionList
protected DefaultExpressionList(io.ebean.ExpressionFactory expr)
-
-
Method Details
-
forFetchGroup
public static <P> io.ebean.ExpressionList<P> forFetchGroup(io.ebean.Query<P> q) -
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
-
asOf
-
asDto
-
asUpdate
-
setIncludeSoftDeletes
-
findVersions
-
findVersionsBetween
-
where
-
orderBy
-
orderBy
-
orderById
-
apply
-
usingTransaction
-
usingConnection
- Specified by:
usingConnectionin interfaceio.ebean.ExpressionList<T>
-
delete
public int delete()- Specified by:
deletein interfaceio.ebean.ExpressionList<T>
-
update
public int update()- Specified by:
updatein interfaceio.ebean.ExpressionList<T>
-
findFutureIds
-
findFutureCount
-
findFutureList
-
findPagedList
-
findCount
public int findCount()- Specified by:
findCountin interfaceio.ebean.ExpressionList<T>
-
findIds
-
findIterate
-
findEach
-
findEach
-
findEachWhile
-
findList
-
findSet
-
findMap
-
findSingleAttributeList
-
findSingleAttributeSet
-
exists
public boolean exists()- Specified by:
existsin interfaceio.ebean.ExpressionList<T>
-
findOne
-
findOneOrEmpty
-
filterMany
-
filterManyRaw
-
withLock
-
withLock
-
forUpdate
-
forUpdateNoWait
-
forUpdateSkipLocked
-
select
-
select
-
setDistinct
-
setFirstRow
-
setMaxRows
-
setMapKey
-
setUseCache
-
setBeanCacheMode
-
setUseQueryCache
-
setCountDistinct
-
setDisableLazyLoading
-
setLabel
-
having
-
add
-
addAll
-
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
public void prepareExpression(io.ebean.event.BeanQueryRequest<?> request) 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
-
jsonNotExists
-
jsonEqualTo
-
jsonNotEqualTo
-
jsonGreaterThan
-
jsonGreaterOrEqual
-
jsonLessThan
-
jsonLessOrEqualTo
-
jsonBetween
-
bitwiseAny
-
bitwiseNot
-
bitwiseAll
-
bitwiseAnd
-
eq
-
eq
-
eqIfPresent
-
eqOrNull
-
ieq
-
ine
-
ne
-
ne
-
allEq
-
and
-
inRangeWith
-
inRangeWithProperties
-
inRange
-
between
-
betweenProperties
-
contains
-
endsWith
-
ge
-
ge
-
gt
-
gt
-
gtOrNull
-
geOrNull
-
gtIfPresent
-
geIfPresent
-
icontains
-
idIn
-
idIn
- Specified by:
idInin interfaceio.ebean.ExpressionList<T>
-
idEq
-
iendsWith
-
ilike
-
inPairs
-
inTuples
-
exists
-
notExists
-
inSubQuery
-
notInSubQuery
-
eqSubQuery
-
neSubQuery
-
gtSubQuery
-
geSubQuery
-
ltSubQuery
-
leSubQuery
-
in
-
in
- Specified by:
inin interfaceio.ebean.ExpressionList<T>
-
inOrEmpty
- Specified by:
inOrEmptyin interfaceio.ebean.ExpressionList<T>
-
in
-
notIn
-
notIn
- Specified by:
notInin interfaceio.ebean.ExpressionList<T>
-
notIn
-
isEmpty
-
isNotEmpty
-
exists
-
notExists
-
isNotNull
-
isNull
-
istartsWith
-
le
-
le
-
exampleLike
-
iexampleLike
-
like
-
lt
-
lt
-
ltOrNull
-
leOrNull
-
ltIfPresent
-
leIfPresent
-
not
-
or
-
arrayContains
-
arrayNotContains
-
arrayIsEmpty
-
arrayIsNotEmpty
-
raw
-
raw
-
raw
-
rawOrEmpty
- Specified by:
rawOrEmptyin interfaceio.ebean.ExpressionList<T>
-
startsWith
-
junction
-
endJunction
-
endAnd
-
endOr
-
endNot
-
and
-
or
-
not
-
conjunction
-
disjunction
-
setUnderlying
Replace the underlying expression list with one organised by nested path. -
idEqualTo
-
clear
-