Class DefaultOrmQuery<T>
- All Implemented Interfaces:
io.ebean.CancelableQuery, io.ebean.Query<T>, io.ebean.QueryBuilder<io.ebean.Query<T>, T>, io.ebean.QueryBuilderProjection<io.ebean.Query<T>, T>, SpiCancelableQuery, SpiQuery<T>, SpiQueryFetch, TxnProfileEventCodes
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.ebean.Query
io.ebean.Query.LockType, io.ebean.Query.LockWait, io.ebean.Query.Property<T>Nested classes/interfaces inherited from interface SpiQuery
SpiQuery.Mode, SpiQuery.TemporalMode, SpiQuery.Type -
Field Summary
Fields inherited from class AbstractQuery
useMasterFields inherited from interface TxnProfileEventCodes
EVT_CALLABLESQL, EVT_COMMIT, EVT_DELETE, EVT_DELETE_PERMANENT, EVT_DELETE_SOFT, EVT_INSERT, EVT_ORMUPDATE, EVT_ROLLBACK, EVT_UPDATE, EVT_UPDATESQL, FIND_ATTRIBUTE, FIND_ATTRIBUTE_SET, FIND_COUNT, FIND_DELETE, FIND_EXISTS, FIND_ID_LIST, FIND_ITERATE, FIND_MANY, FIND_MANY_LAZY, FIND_ONE, FIND_ONE_LAZY, FIND_SUBQUERY, FIND_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOrmQuery(BeanDescriptor<T> desc, SpiEbeanServer server, io.ebean.ExpressionFactory expressionFactory) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddNested(String name, OrmQueryDetail nestedDetail, io.ebean.FetchConfig config) Add a nested fetch graph.final voidaddSoftDeletePredicate(String softDeletePredicate) final Stringalias()Return root table alias set byQueryBuilder.alias(String)command.final io.ebean.Query<T> io.ebean.Query<T> io.ebean.Query<T> alsoIf(BooleanSupplier predicate, Consumer<io.ebean.Query<T>> consumer) final io.ebean.Query<T> apply(io.ebean.FetchPath fetchPath) final <D> io.ebean.DtoQuery<D> final io.ebean.Query<T> final io.ebean.UpdateQuery<T> asUpdate()final StringReturn the base table to use if user defined on the query.final io.ebean.CacheModeReturn the cache mode for using the bean cache (Get and Put).final BindParamsReturn the bind parameters.final intReturn the hint for Statement.setFetchSize().final CacheIdLookup<T> Bean cache lookup for find by ids.final voidCheck that the named parameters have had their values set.final booleanReturn true if the query should have an order by appended automatically.final SpiQueryManyJoinConvert joins as necessary to query joins etc.copy()Return a copy of the query.copy(SpiEbeanServer server) Return a copy of the query attaching to a different EbeanServer.final io.ebean.CountDistinctOrderReturns the count distinct order setting.final SpiNamedParamcreateNamedParameter(String name) Create a named parameter placeholder.final intdelete()final BeanDescriptor<T> Return the bean descriptor for this query.final OrmQueryDetaildetail()Return the query detail.Return the distinct on clause.final io.ebean.Query<T> distinctOn(String distinctOn) final booleanexists()final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> fetchCache(String path) final io.ebean.Query<T> fetchCache(String path, String properties) final io.ebean.Query<T> final io.ebean.Query<T> final voidfetchProperties(String path, OrmQueryProperties other) Set the fetch properties for the given path.final voidfetchProperties(String property, Set<String> columns, io.ebean.FetchConfig config) Specify the fetch properties for the given path.final io.ebean.Query<T> fetchQuery(String path) final io.ebean.Query<T> fetchQuery(String path, String properties) final io.ebean.ExpressionList<T> filterMany(String prop) final intfinal voidfinal voidfinal voidfindEachWhile(Predicate<T> consumer) final io.ebean.FutureRowCount<T> final io.ebean.FutureIds<T> final io.ebean.FutureList<T> final <K> io.ebean.FutureMap<K, T> final <A> List<A> findIds()final io.ebean.QueryIterator<T> findList()findMap()final TfindOne()final io.ebean.PagedList<T> findSet()final <A> Afinal <A> List<A> final <A> Optional<A> final <A> Set<A> findVersionsBetween(Timestamp start, Timestamp end) final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> final StringReturn root table alias with default option.final TimestampgetAsOf()Return the asOf Timestamp which the query should run as.final intReturn the table alias used for the base table.final io.ebean.ExpressionFactoryfinal intReturn the index of the first row to return in the query.final io.ebean.Query.LockTypefinal io.ebean.Query.LockWaitReturn the ForUpdate mode.final Stringfinal ObjectgetId()final intReturn the maximum number of rows to return in the query.final io.ebean.OrderBy<T> Return the Order By clause or null if there is none defined.final StringReturn the origin key.final io.ebean.QueryTypefinal voidhandleLoadError(String fullName, Exception e) Handles load errors.final booleanReturns true if either firstRow or maxRows has been set.final io.ebean.ExpressionList<T> having()final io.ebean.Query<T> having(io.ebean.Expression expression) final SpiExpressionList<T> Can return null if no expressions where added to the having clause.final Stringhint()Return the SQL hint to include in the query.final voidIncrement the counter of tables used in 'As Of' query.final voidincrementAsOfTableCount(int increment) Increment the counter of tables used in 'As Of' query.Return the bind parameters ensuring it is initialised.final booleanReturn true if the base table is using history.final booleanReturn true if this is a 'As Of' query.final booleanReturn true if AutoTune should be attempted on this query.final BooleanReturn explicit AutoTune setting or null.final booleanfinal booleanReturn true if the query should GET against bean cache.final booleanReturn true if the query should PUT against the bean cache.final booleanfinal booleanReturn true if the query detail has neither select or joins specified.final booleanReturn true if lazy loading has been disabled on the query.final booleanreturn true if user specified to use SQL DISTINCT (effectively excludes id property).final booleanReturn true if this is a "find all" query.final booleanReturn true if this is a "find by id" query.final booleanReturn true if we must hit the DB (Cache reload or select for update).final booleanfinal booleanReturn true if this query includes soft deleted rows.final booleanReturn true if the Id property is manually included in the query (DTO queries).final booleanReturn true if this is a native sql query.final booleanisRawSql()Return true if this is a RawSql query.final booleanReturn true if this is a single attribute query.booleanReturn true if the beans returned by this query should be unmodifiable.final booleanReturn false when this is a lazy load or refresh query for a bean.booleanReturn true if this query should not use the read only data source.final booleanReturn true if this is a future query.final booleanReturn true if this is a find versions between query.final booleanisWithId()Return true if the query should include the Id property.final Stringlabel()Return the label set on the query.final intReturn the default lazy load batch size.final BeanPropertyAssocMany<?> Return the lazy loading 'many' property.final StringReturn the property that invoked lazy load.final StringReturn a more detailed description of the lazy or query load.final StringloadMode()Return the load mode (+lazy or +query).final TableJoinReturn the extra join for a M2M lazy load.final ManyWhereJoinsReturn the extra joins required to support the where clause for 'Many' properties.final StringmapKey()Return the property used to specify keys for a map.final SpiQuery.Modemode()Return the query mode.final StringReturn the unmodified native sql query (with named params etc).final NaturalKeyQueryData<T> Collect natural key data for this query or null if the query does not match the requirements of natural key lookup.final NaturalKeyBindParamReturn a Natural Key bind parameter if supported by this query.final io.ebean.OrderBy<T> orderBy()final io.ebean.Query<T> final io.ebean.Query<T> orderById(boolean orderById) final booleanReturn true if there is no Order By clause.final io.ebean.bean.ObjectGraphNodeUsed to hook back a lazy loading query to the original query (query point).final io.ebean.bean.PersistenceContextReturn the TransactionContext.final io.ebean.PersistenceContextScopeReturn the PersistenceContextScope that this query should use.final StringReturn the label manually set on the query or from the profile location.final CQueryPlanKeyprepare(SpiOrmQueryRequest<T> request) Prepare the query which prepares any expressions (sub-query expressions etc) and calculates the query plan key.final StringReturn the profile event id based on query mode and type.final StringReturn the id used to identify a particular query for the given bean type.final io.ebean.ProfileLocationReturn the profile location for this query.final ProfilingListenerIf return null then no profiling for this query.final voidBuild the key for the bind values used in the query (for l2 query cache).final io.ebean.CacheModeReturn the cache mode if this query should use/check the query cache.final HashQueryReturn a hash that includes the query plan and bind values.final ObjectReturn the query plan key.final SpiRawSqlrawSql()Return the RawSql that was set to use for this query.final voidresetBeanCacheAutoMode(boolean findOne) Reset AUTO mode to OFF for findList().Return secondary queries if required.final io.ebean.Query<T> final io.ebean.Query<T> final voidReturn true if select all properties was used to ensure the property invoking a lazy load was included in the query.final voidselectProperties(OrmQueryProperties properties) Set the select properties.final voidselectProperties(Set<String> props) Specify the select properties.final io.ebean.Query<T> final voidsetArrayParameter(String name, Collection<?> values) Bind the named multi-value array parameter which we would use with Postgres ANY.final voidSet when the base table is using history.final io.ebean.Query<T> setAutoTune(boolean autoTune) final voidsetAutoTuned(boolean autoTuned) Set to true if this query has been tuned by autoTune.final io.ebean.Query<T> setBaseTable(String baseTable) final io.ebean.Query<T> setBeanCacheMode(io.ebean.CacheMode beanCacheMode) final io.ebean.Query<T> setBufferFetchSizeHint(int bufferFetchSizeHint) final io.ebean.Query<T> setCountDistinct(io.ebean.CountDistinctOrder countDistinctOrder) final voidsetDefaultFetchBuffer(int fetchSize) Set the JDBC fetchSize buffer hint if not explicitly set.final voidSet default select clauses where none have been explicitly defined.final CQueryPlanKeySet the query to be delete by ids due to cascading delete.final voidsetDetail(OrmQueryDetail detail) Replace the query detail.final io.ebean.Query<T> setDisableLazyLoading(boolean disableLazyLoading) final io.ebean.Query<T> setDistinct(boolean distinct) Internally set to use SQL DISTINCT on the query but still have id property included.final voidsetFilterMany(String prop, io.ebean.ExpressionList<?> filterMany) Set a filter to a join path.final io.ebean.Query<T> setFirstRow(int firstRow) final voidsetGeneratedSql(String generatedSql) Set the generated sql for debug purposes.final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> final io.ebean.Query<T> setLazyLoadBatchSize(int lazyLoadBatchSize) final voidThis becomes a lazy loading query for a many relationship.final voidsetLazyLoadManyPath(String lazyLoadManyPath) Set the path of the many when +query/+lazy loading query is executed.final voidsetLazyLoadProperty(String lazyLoadProperty) Set the property that invoked the lazy load and MUST be included in the lazy loading query.final voidsetLoadDescription(String loadMode, String loadDescription) Set the load mode (+lazy or +query) and the load description.final voidsetM2MIncludeJoin(TableJoin m2mIncludeJoin) Set the extra join for a M2M lazy load.final voidSet to true when we only include the Id property if it is explicitly included in the select().final io.ebean.Query<T> final io.ebean.Query<T> setMaxRows(int maxRows) final voidsetMode(SpiQuery.Mode mode) Set the query mode.final voidsetNativeSql(String nativeSql) final io.ebean.Query<T> setOrderBy(io.ebean.OrderBy<T> orderBy) final io.ebean.bean.ObjectGraphNodesetOrigin(io.ebean.bean.CallOrigin callOrigin) Return the origin point for the query.io.ebean.Query<T> setPaging(@Nullable io.ebean.Paging paging) final io.ebean.Query<T> setParameter(int position, Object value) Set an ordered bind parameter according to its position.final io.ebean.Query<T> setParameter(Object value) final io.ebean.Query<T> setParameter(String name, Object value) Set a named bind parameter.final io.ebean.Query<T> setParameters(Object... values) final voidsetParentNode(io.ebean.bean.ObjectGraphNode parentNode) Set the profile point of the bean or collection that is lazy loading.final voidsetPersistenceContext(io.ebean.bean.PersistenceContext persistenceContext) Set an explicit TransactionContext (typically for a refresh query).final io.ebean.Query<T> setPersistenceContextScope(io.ebean.PersistenceContextScope scope) final io.ebean.Query<T> setProfileLocation(io.ebean.ProfileLocation profileLocation) final voidsetProfilePath(String label, String relativePath, @Nullable io.ebean.ProfileLocation profileLocation) Set the on a secondary query given the label, relativePath and profile location of the parent query.final voidsetProfilingListener(ProfilingListener profilingListener) This has the effect of turning on profiling for this query.final io.ebean.Query<T> setRawSql(io.ebean.RawSql rawSql) final voidSet the select clause to select the Id property.final voidMark the query as selecting a single attribute.final voidsetTenantId(Object tenantId) Set the tenantId to use for lazy loading.final io.ebean.Query<T> setTimeout(int secs) final voidsetType(SpiQuery.Type type) Set the query type (List, Set etc).io.ebean.Query<T> setUnmodifiable(boolean unmodifiable) final voidSetup to be a delete or update query.final voidsetUsageProfiling(boolean usageProfiling) Set to false if this query should not be included in the AutoTune usage profiling information.final io.ebean.Query<T> setUseQueryCache(io.ebean.CacheMode useQueryCache) final voidSimplify nested expression lists where possible.final SpiQuery.TemporalModeReturn the Temporal mode for the query.final ObjecttenantId()Return the tenantId to use for lazy loading.final inttimeout()Return the timeout.final StringtoString()Return the transaction explicitly assigned or null.final booleantuneFetchProperties(OrmQueryDetail tunedDetail) AutoTune tune the detail specifying properties to select on already defined joins and adding extra joins where they are missing.final SpiQuery.Typetype()Return the type of query (List, Set, Map, Bean, rowCount etc).final intupdate()final OrmUpdatePropertiesReturn the properties for an update query.final io.ebean.Query<T> usingConnection(Connection connection) final io.ebean.Query<T> usingDatabase(io.ebean.Database database) final voidSet that this is a future query that will execute in the background.io.ebean.Query<T> usingMaster(boolean useMaster) final io.ebean.Query<T> usingTransaction(io.ebean.Transaction transaction) validate()Validate all the expression properties/paths given the bean descriptor.final TimestampReturn the find versions end timestamp.final TimestampReturn the find versions start timestamp.final io.ebean.ExpressionList<T> where()final io.ebean.Query<T> where(io.ebean.Expression expression) final SpiExpressionList<T> Can return null if no expressions where added to the where clause.final io.ebean.Query<T> withLock(io.ebean.Query.LockType lockType) final io.ebean.Query<T> withLock(io.ebean.Query.LockType lockType, io.ebean.Query.LockWait lockWait) Methods inherited from class AbstractQuery
cancel, checkCancelled, setCancelableQueryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.ebean.CancelableQuery
cancelMethods inherited from interface io.ebean.QueryBuilder
setUseCache, setUseQueryCache, usingMasterMethods inherited from interface SpiCancelableQuery
checkCancelled, setCancelableQuery
-
Constructor Details
-
DefaultOrmQuery
public DefaultOrmQuery(BeanDescriptor<T> desc, SpiEbeanServer server, io.ebean.ExpressionFactory expressionFactory)
-
-
Method Details
-
setNativeSql
-
asDto
-
asUpdate
-
descriptor
Description copied from interface:SpiQueryReturn the bean descriptor for this query.- Specified by:
descriptorin interfaceSpiQuery<T>
-
isFindAll
-
isFindById
public final boolean isFindById()Description copied from interface:SpiQueryReturn true if this is a "find by id" query. This includes a check for a single "equal to" expression for the Id.- Specified by:
isFindByIdin interfaceSpiQuery<T>
-
profileEventId
Description copied from interface:SpiQueryReturn the profile event id based on query mode and type.- Specified by:
profileEventIdin interfaceSpiQuery<T>
-
profileId
-
setProfileLocation
-
label
-
hint
-
planLabel
-
setProfilePath
public final void setProfilePath(String label, String relativePath, @Nullable io.ebean.ProfileLocation profileLocation) Description copied from interface:SpiQuerySet the on a secondary query given the label, relativePath and profile location of the parent query.- Specified by:
setProfilePathin interfaceSpiQuery<T>
-
setLabel
-
setHint
-
isAutoTunable
public final boolean isAutoTunable()Description copied from interface:SpiQueryReturn true if AutoTune should be attempted on this query.- Specified by:
isAutoTunablein interfaceSpiQuery<T>
-
apply
-
also
-
alsoIf
-
addSoftDeletePredicate
- Specified by:
addSoftDeletePredicatein interfaceSpiQuery<T>
-
softDeletePredicates
- Specified by:
softDeletePredicatesin interfaceSpiQuery<T>
-
isAsOfBaseTable
public final boolean isAsOfBaseTable()Description copied from interface:SpiQueryReturn true if the base table is using history.- Specified by:
isAsOfBaseTablein interfaceSpiQuery<T>
-
setAsOfBaseTable
public final void setAsOfBaseTable()Description copied from interface:SpiQuerySet when the base table is using history.- Specified by:
setAsOfBaseTablein interfaceSpiQuery<T>
-
setAllowLoadErrors
-
incrementAsOfTableCount
public final void incrementAsOfTableCount()Description copied from interface:SpiQueryIncrement the counter of tables used in 'As Of' query.- Specified by:
incrementAsOfTableCountin interfaceSpiQuery<T>
-
incrementAsOfTableCount
public final void incrementAsOfTableCount(int increment) Description copied from interface:SpiQueryIncrement the counter of tables used in 'As Of' query.- Specified by:
incrementAsOfTableCountin interfaceSpiQuery<T>
-
getAsOfTableCount
public final int getAsOfTableCount()Description copied from interface:SpiQueryReturn the table alias used for the base table.- Specified by:
getAsOfTableCountin interfaceSpiQuery<T>
-
getAsOf
-
asOf
-
setIncludeSoftDeletes
-
rawSql
-
setRawSql
-
getOriginKey
Description copied from interface:SpiQueryReturn the origin key.- Specified by:
getOriginKeyin interfaceSpiQuery<T>
-
lazyLoadBatchSize
public final int lazyLoadBatchSize()Description copied from interface:SpiQueryReturn the default lazy load batch size.- Specified by:
lazyLoadBatchSizein interfaceSpiQuery<T>
-
setLazyLoadBatchSize
-
lazyLoadProperty
Description copied from interface:SpiQueryReturn the property that invoked lazy load.- Specified by:
lazyLoadPropertyin interfaceSpiQuery<T>
-
setLazyLoadProperty
Description copied from interface:SpiQuerySet the property that invoked the lazy load and MUST be included in the lazy loading query.- Specified by:
setLazyLoadPropertyin interfaceSpiQuery<T>
-
getExpressionFactory
public final io.ebean.ExpressionFactory getExpressionFactory()- Specified by:
getExpressionFactoryin interfaceio.ebean.Query<T>
-
manyWhereJoins
Return the extra joins required to support the where clause for 'Many' properties.- Specified by:
manyWhereJoinsin interfaceSpiQuery<T>
-
selectAllForLazyLoadProperty
public final void selectAllForLazyLoadProperty()Return true if select all properties was used to ensure the property invoking a lazy load was included in the query.- Specified by:
selectAllForLazyLoadPropertyin interfaceSpiQuery<T>
-
setLazyLoadManyPath
Description copied from interface:SpiQuerySet the path of the many when +query/+lazy loading query is executed.- Specified by:
setLazyLoadManyPathin interfaceSpiQuery<T>
-
convertJoins
Description copied from interface:SpiQueryConvert joins as necessary to query joins etc.- Specified by:
convertJoinsin interfaceSpiQuery<T>
-
secondaryQuery
Description copied from interface:SpiQueryReturn secondary queries if required.- Specified by:
secondaryQueryin interfaceSpiQuery<T>
-
setDefaultSelectClause
public final void setDefaultSelectClause()Description copied from interface:SpiQuerySet default select clauses where none have been explicitly defined.- Specified by:
setDefaultSelectClausein interfaceSpiQuery<T>
-
setTenantId
Description copied from interface:SpiQuerySet the tenantId to use for lazy loading.- Specified by:
setTenantIdin interfaceSpiQuery<T>
-
tenantId
-
setDetail
Description copied from interface:SpiQueryReplace the query detail. This is used by the AutoTune feature to as a fast way to set the query properties and joins.Note care must be taken to keep the where, orderBy, firstRows and maxRows held in the detail attributes.
-
tuneFetchProperties
Description copied from interface:SpiQueryAutoTune tune the detail specifying properties to select on already defined joins and adding extra joins where they are missing.- Specified by:
tuneFetchPropertiesin interfaceSpiQuery<T>
-
detail
Description copied from interface:SpiQueryReturn the query detail. -
filterMany
-
setFilterMany
Description copied from interface:SpiQuerySet a filter to a join path.- Specified by:
setFilterManyin interfaceSpiQuery<T>
-
setupForDeleteOrUpdate
public final void setupForDeleteOrUpdate()Setup to be a delete or update query.- Specified by:
setupForDeleteOrUpdatein interfaceSpiQuery<T>
-
setDeleteByIdsPlan
Description copied from interface:SpiQuerySet the query to be delete by ids due to cascading delete.- Specified by:
setDeleteByIdsPlanin interfaceSpiQuery<T>
-
setSelectId
public final void setSelectId()Set the select clause to select the Id property.- Specified by:
setSelectIdin interfaceSpiQuery<T>
-
setSingleAttribute
public final void setSingleAttribute()Description copied from interface:SpiQueryMark the query as selecting a single attribute.- Specified by:
setSingleAttributein interfaceSpiQuery<T>
-
isSingleAttribute
public final boolean isSingleAttribute()Return true if this is a single attribute query.- Specified by:
isSingleAttributein interfaceSpiQuery<T>
-
countDistinctOrder
public final io.ebean.CountDistinctOrder countDistinctOrder()Description copied from interface:SpiQueryReturns the count distinct order setting.- Specified by:
countDistinctOrderin interfaceSpiQuery<T>
-
isWithId
-
cacheIdLookup
Description copied from interface:SpiQueryBean cache lookup for find by ids.- Specified by:
cacheIdLookupin interfaceSpiQuery<T>
-
naturalKey
Description copied from interface:SpiQueryCollect natural key data for this query or null if the query does not match the requirements of natural key lookup.- Specified by:
naturalKeyin interfaceSpiQuery<T>
-
naturalKeyBindParam
Description copied from interface:SpiQueryReturn a Natural Key bind parameter if supported by this query.- Specified by:
naturalKeyBindParamin interfaceSpiQuery<T>
-
copy
-
copy
-
setPersistenceContextScope
-
persistenceContextScope
public final io.ebean.PersistenceContextScope persistenceContextScope()Description copied from interface:SpiQueryReturn the PersistenceContextScope that this query should use.This can be null and in that case use the default scope.
- Specified by:
persistenceContextScopein interfaceSpiQuery<T>
-
type
Description copied from interface:SpiQueryReturn the type of query (List, Set, Map, Bean, rowCount etc). -
setType
Description copied from interface:SpiQuerySet the query type (List, Set etc). -
distinctOn
Description copied from interface:SpiQueryReturn the distinct on clause.- Specified by:
distinctOnin interfaceSpiQuery<T>
-
loadDescription
Description copied from interface:SpiQueryReturn a more detailed description of the lazy or query load.- Specified by:
loadDescriptionin interfaceSpiQuery<T>
-
loadMode
-
setLoadDescription
-
persistenceContext
public final io.ebean.bean.PersistenceContext persistenceContext()Return the TransactionContext.If no TransactionContext is present on the query then the TransactionContext from the Transaction is used (transaction scoped persistence context).
- Specified by:
persistenceContextin interfaceSpiQuery<T>
-
setPersistenceContext
public final void setPersistenceContext(io.ebean.bean.PersistenceContext persistenceContext) Set an explicit TransactionContext (typically for a refresh query).If no TransactionContext is present on the query then the TransactionContext from the Transaction is used (transaction scoped persistence context).
- Specified by:
setPersistenceContextin interfaceSpiQuery<T>
-
setLazyLoadForParents
Description copied from interface:SpiQueryThis becomes a lazy loading query for a many relationship.- Specified by:
setLazyLoadForParentsin interfaceSpiQuery<T>
-
lazyLoadMany
Description copied from interface:SpiQueryReturn the lazy loading 'many' property.- Specified by:
lazyLoadManyin interfaceSpiQuery<T>
-
isDetailEmpty
public final boolean isDetailEmpty()Return true if the query detail has neither select or joins specified.- Specified by:
isDetailEmptyin interfaceSpiQuery<T>
-
isAutoTuned
public final boolean isAutoTuned()- Specified by:
isAutoTunedin interfaceio.ebean.Query<T>
-
setAutoTuned
public final void setAutoTuned(boolean autoTuned) Description copied from interface:SpiQuerySet to true if this query has been tuned by autoTune.- Specified by:
setAutoTunedin interfaceSpiQuery<T>
-
isAutoTune
Description copied from interface:SpiQueryReturn explicit AutoTune setting or null. If null then not explicitly set so we use the default behaviour.- Specified by:
isAutoTunein interfaceSpiQuery<T>
-
setAutoTune
-
withLock
-
withLock
-
forUpdate
-
forUpdateNoWait
-
forUpdateSkipLocked
-
isForUpdate
public final boolean isForUpdate()- Specified by:
isForUpdatein interfaceio.ebean.Query<T>
-
getForUpdateLockWait
public final io.ebean.Query.LockWait getForUpdateLockWait()Description copied from interface:SpiQueryReturn the ForUpdate mode.- Specified by:
getForUpdateLockWaitin interfaceio.ebean.Query<T>- Specified by:
getForUpdateLockWaitin interfaceSpiQuery<T>
-
getForUpdateLockType
public final io.ebean.Query.LockType getForUpdateLockType()- Specified by:
getForUpdateLockTypein interfaceio.ebean.Query<T>
-
profilingListener
Description copied from interface:SpiQueryIf return null then no profiling for this query. If a ProfilingListener is returned this implies that profiling is turned on for this query (and all the objects this query creates).- Specified by:
profilingListenerin interfaceSpiQuery<T>
-
setProfilingListener
Description copied from interface:SpiQueryThis has the effect of turning on profiling for this query.- Specified by:
setProfilingListenerin interfaceSpiQuery<T>
-
getQueryType
public final io.ebean.QueryType getQueryType()- Specified by:
getQueryTypein interfaceio.ebean.Query<T>
-
mode
Description copied from interface:SpiQueryReturn the query mode. -
temporalMode
Description copied from interface:SpiQueryReturn the Temporal mode for the query.- Specified by:
temporalModein interfaceSpiQuery<T>
-
isAsOfQuery
public final boolean isAsOfQuery()Description copied from interface:SpiQueryReturn true if this is a 'As Of' query.- Specified by:
isAsOfQueryin interfaceSpiQuery<T>
-
isIncludeSoftDeletes
public final boolean isIncludeSoftDeletes()Description copied from interface:SpiQueryReturn true if this query includes soft deleted rows.- Specified by:
isIncludeSoftDeletesin interfaceSpiQuery<T>
-
setMode
Description copied from interface:SpiQuerySet the query mode. -
usingFuture
public final void usingFuture()Description copied from interface:SpiQuerySet that this is a future query that will execute in the background.- Specified by:
usingFuturein interfaceSpiQuery<T>
-
isUsingFuture
public final boolean isUsingFuture()Description copied from interface:SpiQueryReturn true if this is a future query.- Specified by:
isUsingFuturein interfaceSpiQuery<T>
-
isUsageProfiling
public final boolean isUsageProfiling()Description copied from interface:SpiQueryReturn false when this is a lazy load or refresh query for a bean.We just take/copy the data from those beans and don't collect AutoTune usage profiling on those lazy load or refresh beans.
- Specified by:
isUsageProfilingin interfaceSpiQuery<T>
-
setUsageProfiling
public final void setUsageProfiling(boolean usageProfiling) Description copied from interface:SpiQuerySet to false if this query should not be included in the AutoTune usage profiling information.- Specified by:
setUsageProfilingin interfaceSpiQuery<T>
-
setParentNode
public final void setParentNode(io.ebean.bean.ObjectGraphNode parentNode) Description copied from interface:SpiQuerySet the profile point of the bean or collection that is lazy loading.This enables use to hook this back to the original 'root' query by the queryPlanHash and stackPoint.
- Specified by:
setParentNodein interfaceSpiQuery<T>
-
parentNode
public final io.ebean.bean.ObjectGraphNode parentNode()Description copied from interface:SpiQueryUsed to hook back a lazy loading query to the original query (query point).This will return null or an "original" query.
- Specified by:
parentNodein interfaceSpiQuery<T>
-
setOrigin
public final io.ebean.bean.ObjectGraphNode setOrigin(io.ebean.bean.CallOrigin callOrigin) Description copied from interface:SpiQueryReturn the origin point for the query.This MUST be call prior to a query being changed via tuning. This is because the queryPlanHash is used to identify the query point.
-
isNativeSql
public final boolean isNativeSql()Description copied from interface:SpiQueryReturn true if this is a native sql query.- Specified by:
isNativeSqlin interfaceSpiQuery<T>
-
nativeSql
-
queryPlanKey
Description copied from interface:SpiQueryReturn the query plan key.- Specified by:
queryPlanKeyin interfaceSpiQuery<T>
-
prepare
Prepare the query which prepares any expressions (sub-query expressions etc) and calculates the query plan key. -
queryBindKey
Description copied from interface:SpiQueryBuild the key for the bind values used in the query (for l2 query cache).Combined with queryPlanHash() to return queryHash (a unique key for a query).
- Specified by:
queryBindKeyin interfaceSpiQuery<T>
-
queryHash
-
isRawSql
-
timeout
-
hasMaxRowsOrFirstRow
public final boolean hasMaxRowsOrFirstRow()Description copied from interface:SpiQueryReturns true if either firstRow or maxRows has been set.- Specified by:
hasMaxRowsOrFirstRowin interfaceSpiQuery<T>
-
isVersionsBetween
public final boolean isVersionsBetween()Description copied from interface:SpiQueryReturn true if this is a find versions between query.- Specified by:
isVersionsBetweenin interfaceSpiQuery<T>
-
versionStart
Description copied from interface:SpiQueryReturn the find versions start timestamp.- Specified by:
versionStartin interfaceSpiQuery<T>
-
versionEnd
Description copied from interface:SpiQueryReturn the find versions end timestamp.- Specified by:
versionEndin interfaceSpiQuery<T>
-
setUnmodifiable
-
isUnmodifiable
public boolean isUnmodifiable()Description copied from interface:SpiQueryReturn true if the beans returned by this query should be unmodifiable.- Specified by:
isUnmodifiablein interfaceSpiQuery<T>
-
isBeanCachePut
public final boolean isBeanCachePut()Description copied from interface:SpiQueryReturn true if the query should PUT against the bean cache.- Specified by:
isBeanCachePutin interfaceSpiQuery<T>
-
isBeanCacheGet
public final boolean isBeanCacheGet()Description copied from interface:SpiQueryReturn true if the query should GET against bean cache.- Specified by:
isBeanCacheGetin interfaceSpiQuery<T>
-
isForceHitDatabase
public final boolean isForceHitDatabase()Description copied from interface:SpiQueryReturn true if we must hit the DB (Cache reload or select for update).- Specified by:
isForceHitDatabasein interfaceSpiQuery<T>
-
resetBeanCacheAutoMode
public final void resetBeanCacheAutoMode(boolean findOne) Description copied from interface:SpiQueryReset AUTO mode to OFF for findList(). Expect explicit cache use with findList().- Specified by:
resetBeanCacheAutoModein interfaceSpiQuery<T>
-
beanCacheMode
public final io.ebean.CacheMode beanCacheMode()Description copied from interface:SpiQueryReturn the cache mode for using the bean cache (Get and Put).- Specified by:
beanCacheModein interfaceSpiQuery<T>
-
queryCacheMode
public final io.ebean.CacheMode queryCacheMode()Description copied from interface:SpiQueryReturn the cache mode if this query should use/check the query cache.- Specified by:
queryCacheModein interfaceSpiQuery<T>
-
setBeanCacheMode
-
setUseQueryCache
-
setTimeout
-
selectProperties
Description copied from interface:SpiQueryFetchSpecify the select properties.- Specified by:
selectPropertiesin interfaceSpiQueryFetch
-
fetchProperties
public final void fetchProperties(String property, Set<String> columns, io.ebean.FetchConfig config) Description copied from interface:SpiQueryFetchSpecify the fetch properties for the given path.- Specified by:
fetchPropertiesin interfaceSpiQueryFetch
-
selectProperties
Description copied from interface:SpiQuerySet the select properties.- Specified by:
selectPropertiesin interfaceSpiQuery<T>
-
fetchProperties
Description copied from interface:SpiQuerySet the fetch properties for the given path.- Specified by:
fetchPropertiesin interfaceSpiQuery<T>
-
addNested
Description copied from interface:SpiQueryFetchAdd a nested fetch graph.- Specified by:
addNestedin interfaceSpiQueryFetch
-
distinctOn
-
select
-
select
-
fetch
-
fetch
-
fetch
-
fetch
-
fetchQuery
-
fetchCache
-
fetchLazy
-
fetchQuery
-
fetchCache
-
fetchLazy
-
transaction
Description copied from interface:SpiQueryReturn the transaction explicitly assigned or null.- Specified by:
transactionin interfaceSpiQuery<T>
-
usingTransaction
-
usingConnection
-
usingDatabase
-
usingMaster
-
isUseMaster
public boolean isUseMaster()Description copied from interface:SpiQueryReturn true if this query should not use the read only data source.- Specified by:
isUseMasterin interfaceSpiQuery<T>
-
delete
-
update
public final int update()- Specified by:
updatein interfaceio.ebean.Query<T>
-
findIds
-
exists
-
findCount
-
findEachWhile
-
findEach
-
findEach
-
findIterate
-
findStream
-
findVersions
-
findVersionsBetween
-
findList
-
findSet
-
findMap
-
findSingleAttributeList
-
findSingleAttributeSet
-
findSingleAttribute
-
findSingleAttributeOrEmpty
-
findOne
-
findOneOrEmpty
-
findFutureIds
-
findFutureList
-
findFutureMap
-
findFutureCount
-
findPagedList
-
setParameter
-
setParameters
-
setParameter
Set an ordered bind parameter according to its position. Note that the position starts at 1 to be consistent with JDBC PreparedStatement. You need to set a parameter value for each ? you have in the query.- Specified by:
setParameterin interfaceio.ebean.Query<T>
-
setParameter
-
setArrayParameter
Description copied from interface:SpiQueryBind the named multi-value array parameter which we would use with Postgres ANY.- Specified by:
setArrayParameterin interfaceSpiQuery<T>
-
checkPagingOrderBy
public final boolean checkPagingOrderBy()Description copied from interface:SpiQueryReturn true if the query should have an order by appended automatically.- Specified by:
checkPagingOrderByin interfaceSpiQuery<T>
-
orderByIsEmpty
public final boolean orderByIsEmpty()Description copied from interface:SpiQueryReturn true if there is no Order By clause.- Specified by:
orderByIsEmptyin interfaceSpiQuery<T>
-
getOrderBy
Description copied from interface:SpiQueryReturn the Order By clause or null if there is none defined.- Specified by:
getOrderByin interfaceSpiQuery<T>
-
orderBy
-
orderBy
-
setOrderBy
-
isManualId
public final boolean isManualId()Description copied from interface:SpiQueryReturn true if the Id property is manually included in the query (DTO queries).- Specified by:
isManualIdin interfaceSpiQuery<T>
-
setManualId
public final void setManualId()Description copied from interface:SpiQuerySet to true when we only include the Id property if it is explicitly included in the select().- Specified by:
setManualIdin interfaceSpiQuery<T>
-
isDistinct
public final boolean isDistinct()return true if user specified to use SQL DISTINCT (effectively excludes id property).- Specified by:
isDistinctin interfaceSpiQuery<T>
-
setDistinct
-
setCountDistinct
-
isCountDistinct
public final boolean isCountDistinct()- Specified by:
isCountDistinctin interfaceio.ebean.Query<T>
-
getBeanType
-
toString
-
m2mIncludeJoin
Description copied from interface:SpiQueryReturn the extra join for a M2M lazy load.- Specified by:
m2mIncludeJoinin interfaceSpiQuery<T>
-
setM2MIncludeJoin
Description copied from interface:SpiQuerySet the extra join for a M2M lazy load.- Specified by:
setM2MIncludeJoinin interfaceSpiQuery<T>
-
setDisableLazyLoading
-
isDisableLazyLoading
public final boolean isDisableLazyLoading()Description copied from interface:SpiQueryReturn true if lazy loading has been disabled on the query.- Specified by:
isDisableLazyLoadingin interfaceSpiQuery<T>
-
getFirstRow
public final int getFirstRow()Description copied from interface:SpiQueryReturn the index of the first row to return in the query.- Specified by:
getFirstRowin interfaceio.ebean.Query<T>- Specified by:
getFirstRowin interfaceSpiQuery<T>
-
setFirstRow
-
getMaxRows
public final int getMaxRows()Description copied from interface:SpiQueryReturn the maximum number of rows to return in the query.- Specified by:
getMaxRowsin interfaceio.ebean.Query<T>- Specified by:
getMaxRowsin interfaceSpiQuery<T>
-
setMaxRows
-
setPaging
-
mapKey
-
setMapKey
-
getId
-
setId
-
bindParams
Description copied from interface:SpiQueryReturn the bind parameters.- Specified by:
bindParamsin interfaceSpiQuery<T>
-
initBindParams
Description copied from interface:SpiQueryReturn the bind parameters ensuring it is initialised.- Specified by:
initBindParamsin interfaceSpiQuery<T>
-
where
-
where
-
simplifyExpressions
public final void simplifyExpressions()Description copied from interface:SpiQuerySimplify nested expression lists where possible.- Specified by:
simplifyExpressionsin interfaceSpiQuery<T>
-
having
-
having
-
havingExpressions
Description copied from interface:SpiQueryCan return null if no expressions where added to the having clause.- Specified by:
havingExpressionsin interfaceSpiQuery<T>
-
whereExpressions
Description copied from interface:SpiQueryCan return null if no expressions where added to the where clause.- Specified by:
whereExpressionsin interfaceSpiQuery<T>
-
getGeneratedSql
-
setGeneratedSql
Description copied from interface:SpiQuerySet the generated sql for debug purposes.- Specified by:
setGeneratedSqlin interfaceSpiQuery<T>
-
checkNamedParameters
public final void checkNamedParameters()Description copied from interface:SpiQueryCheck that the named parameters have had their values set.- Specified by:
checkNamedParametersin interfaceSpiQuery<T>
-
createNamedParameter
Description copied from interface:SpiQueryCreate a named parameter placeholder.- Specified by:
createNamedParameterin interfaceSpiQuery<T>
-
setDefaultFetchBuffer
public final void setDefaultFetchBuffer(int fetchSize) Description copied from interface:SpiQuerySet the JDBC fetchSize buffer hint if not explicitly set.- Specified by:
setDefaultFetchBufferin interfaceSpiQuery<T>
-
setBufferFetchSizeHint
-
bufferFetchSizeHint
public final int bufferFetchSizeHint()Description copied from interface:SpiQueryReturn the hint for Statement.setFetchSize().- Specified by:
bufferFetchSizeHintin interfaceSpiQuery<T>
-
setBaseTable
-
baseTable
-
alias
-
alias
-
getAlias
-
validate
-
validate
-
updateProperties
Description copied from interface:SpiQueryReturn the properties for an update query.- Specified by:
updatePropertiesin interfaceSpiQuery<T>
-
profileLocation
public final io.ebean.ProfileLocation profileLocation()Description copied from interface:SpiQueryReturn the profile location for this query.- Specified by:
profileLocationin interfaceSpiQuery<T>
-
handleLoadError
-
orderById
-