Interface SpiQuery<T>
-
- All Superinterfaces:
Query<T>
,TxnProfileEventCodes
- All Known Implementing Classes:
DefaultOrmQuery
public interface SpiQuery<T> extends Query<T>, TxnProfileEventCodes
Object Relational query - Internal extension to Query object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SpiQuery.Mode
static class
SpiQuery.TemporalMode
static class
SpiQuery.Type
The type of query result.-
Nested classes/interfaces inherited from interface io.ebean.Query
Query.ForUpdate
-
-
Field Summary
-
Fields inherited from interface io.ebeaninternal.api.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_COUNT, FIND_DELETE, FIND_ID_LIST, FIND_ITERATE, FIND_MANY, FIND_MANY_LAZY, FIND_ONE, FIND_ONE_LAZY, FIND_SUBQUERY, FIND_UPDATE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addSoftDeletePredicate(String softDeletePredicate)
CacheIdLookup<T>
cacheIdLookup()
Bean cache lookup for find by ids.void
checkNamedParameters()
Check that the named parameters have had their values set.boolean
checkPagingOrderBy()
Return true if the query should have an order by appended automatically.SpiQuerySecondary
convertJoins()
Convert joins as necessary to query joins etc.SpiQuery<T>
copy()
Return a copy of the query.SpiQuery<T>
copy(SpiEbeanServer server)
Return a copy of the query attaching to a different EbeanServer.SpiNamedParam
createNamedParameter(String parameterName)
Create a named parameter placeholder.String
getAlias()
Return root table alias set byQuery.alias(String)
command.Timestamp
getAsOf()
Return the asOf Timestamp which the query should run as.int
getAsOfTableCount()
Return the table alias used for the base table.String
getBaseTable()
Return the base table to use if user defined on the query.BeanDescriptor<T>
getBeanDescriptor()
Return the bean descriptor for this query.BindParams
getBindParams()
Return the bind parameters.int
getBufferFetchSizeHint()
Return the hint for Statement.setFetchSize().CountDistinctOrder
getCountDistinctOrder()
Returns the count distinct order setting.OrmQueryDetail
getDetail()
Return the query detail.String
getDocIndexName()
For doc store query return the document index name to search against.int
getFirstRow()
Return the index of the first row to return in the query.Query.ForUpdate
getForUpdateMode()
Return the ForUpdate mode.ReadEvent
getFutureFetchAudit()
Read the readEvent for future queries (null otherwise).SpiExpressionList<T>
getHavingExpressions()
Can return null if no expressions where added to the having clause.String
getLabel()
Return the label set on the query.int
getLazyLoadBatchSize()
Return the default lazy load batch size.BeanPropertyAssocMany<?>
getLazyLoadMany()
Return the lazy loading 'many' property.String
getLazyLoadProperty()
Return the property that invoked lazy load.String
getLoadDescription()
Return a more detailed description of the lazy or query load.String
getLoadMode()
Return the load mode (+lazy or +query).TableJoin
getM2mIncludeJoin()
Return the extra join for a M2M lazy load.ManyWhereJoins
getManyWhereJoins()
Return the joins required to support predicates on the many properties.String
getMapKey()
Return the property used to specify keys for a map.int
getMaxRows()
Return the maximum number of rows to return in the query.SpiQuery.Mode
getMode()
Return the query mode.String
getNativeSql()
Return the unmodified native sql query (with named params etc).NaturalKeyBindParam
getNaturalKeyBindParam()
Return a Natural Key bind parameter if supported by this query.OrderBy<T>
getOrderBy()
Return the Order By clause or null if there is none defined.String
getOriginKey()
Return the origin key.ObjectGraphNode
getParentNode()
Used to hook back a lazy loading query to the original query (query point).PersistenceContext
getPersistenceContext()
Return the TransactionContext.PersistenceContextScope
getPersistenceContextScope()
Return the PersistenceContextScope that this query should use.String
getPlanLabel()
Return the label manually set on the query or from the profile location.String
getProfileId()
Return the id used to identify a particular query for the given bean type.ProfileLocation
getProfileLocation()
Return the profile location for this query.ProfilingListener
getProfilingListener()
If return null then no profiling for this query.Object
getQueryPlanKey()
Return the query plan key.SpiRawSql
getRawSql()
Return the RawSql that was set to use for this query.List<String>
getSoftDeletePredicates()
SpiQuery.TemporalMode
getTemporalMode()
Return the Temporal mode for the query.Object
getTenantId()
Return the tenantId to use for lazy loading.SpiExpressionList<T>
getTextExpression()
Return the text expressions.int
getTimeout()
Return the query timeout.SpiQuery.Type
getType()
Return the type of query (List, Set, Map, Bean, rowCount etc).OrmUpdateProperties
getUpdateProperties()
Return the properties for an update query.CacheMode
getUseBeanCache()
Return the cache mode for using the bean cache (Get and Put).CacheMode
getUseQueryCache()
Return the cache mode if this query should use/check the query cache.Timestamp
getVersionEnd()
Return the find versions end timestamp.Timestamp
getVersionStart()
Return the find versions start timestamp.SpiExpressionList<T>
getWhereExpressions()
Can return null if no expressions where added to the where clause.void
handleLoadError(String fullName, Exception e)
Handles load errors.boolean
hasMaxRowsOrFirstRow()
Returns true if either firstRow or maxRows has been set.void
incrementAsOfTableCount()
Increment the counter of tables used in 'As Of' query.boolean
isAsDraft()
Return true if this is a 'As Draft' query.boolean
isAsOfBaseTable()
Return true if the base table is using history.boolean
isAsOfQuery()
Return true if this is a 'As Of' query.boolean
isAutoTunable()
Return true if AutoTune should be attempted on this query.Boolean
isAutoTune()
Return explicit AutoTune setting or null.boolean
isBeanCacheGet()
Return true if the query should GET against bean cache.boolean
isBeanCachePut()
Return true if the query should PUT against the bean cache.boolean
isCancelled()
Return true if this query has been cancelled.boolean
isDetailEmpty()
Return true if the query detail has neither select or joins specified.boolean
isDisableLazyLoading()
Return true if lazy loading has been disabled on the query.boolean
isDisableReadAudit()
Return true if read auditing is disabled on this query.boolean
isDistinct()
Return true if this query has been specified by a user to use DISTINCT.boolean
isFindAll()
Return true if this is a "find all" query.boolean
isFindById()
Return true if this is a "find by id" query.boolean
isForceHitDatabase()
Return true if we must hit the DB (Cache reload or select for update).boolean
isFutureFetch()
Return true if this is a query executing in the background.boolean
isIncludeSoftDeletes()
Return true if this query includes soft deleted rows.boolean
isManualId()
Return true if the Id property is manually included in the query (DTO queries).boolean
isNativeSql()
Return true if this is a native sql query.boolean
isRawSql()
Return true if this is a RawSql query.Boolean
isReadOnly()
Return true if the beans returned by this query should be read only.boolean
isSingleAttribute()
Return true if this is singleAttribute query.boolean
isUsageProfiling()
Return false when this is a lazy load or refresh query for a bean.boolean
isUseDocStore()
Return true if this query should be executed against the doc store.boolean
isVersionsBetween()
Return true if this is a find versions between query.boolean
isWithId()
Return true if the query should include the Id property.NaturalKeyQueryData<T>
naturalKey()
Collect natural key data for this query or null if the query does not match the requirements of natural key lookup.boolean
orderByIsEmpty()
Return true if there is no Order By clause.CQueryPlanKey
prepare(SpiOrmQueryRequest<T> request)
Prepare the query which prepares sub-query expressions and calculates and returns the query plan key.void
prepareDocNested()
Prepare the query for docstore execution with nested paths.String
profileEventId()
Return the profile event id based on query mode and type.int
queryBindHash()
Calculate a hash based on the bind values used in the query.HashQuery
queryHash()
Identifies queries that are exactly the same including bind variables.void
resetBeanCacheAutoMode(boolean findOne)
Reset AUTO mode to OFF for findList().boolean
selectAllForLazyLoadProperty()
Return true if select all properties was used to ensure the property invoking a lazy load was included in the query.void
setAsOfBaseTable()
Set when the base table is using history.void
setAutoTuned(boolean autoTuned)
Set to true if this query has been tuned by autoTune.void
setCancelableQuery(CancelableQuery cancelableQuery)
Set the underlying cancelable query (with the PreparedStatement).void
setDefaultFetchBuffer(int fetchSize)
Set the JDBC fetchSize buffer hint if not explicitly set.void
setDefaultRawSqlIfRequired()
If this is a RawSql based entity set the default RawSql if not set.void
setDefaultSelectClause()
Set default select clauses where none have been explicitly defined.CQueryPlanKey
setDeleteByIdsPlan()
Set the query to be delete by ids due to cascading delete.void
setDetail(OrmQueryDetail detail)
Replace the query detail.void
setFilterMany(String prop, ExpressionList<?> filterMany)
Set a filter to a join path.void
setFutureFetch(boolean futureFetch)
Set to true to indicate the query is executing in a background thread asynchronously.void
setFutureFetchAudit(ReadEvent event)
Set the readEvent for future queries (as prepared in foreground thread).void
setGeneratedSql(String generatedSql)
Set the generated sql for debug purposes.void
setLazyLoadForParents(BeanPropertyAssocMany<?> many)
This becomes a lazy loading query for a many relationship.void
setLazyLoadManyPath(String lazyLoadManyPath)
Set the path of the many when +query/+lazy loading query is executed.void
setLazyLoadProperty(String lazyLoadProperty)
Set the property that invoked the lazy load and MUST be included in the lazy loading query.void
setLoadDescription(String loadMode, String loadDescription)
Set the load mode (+lazy or +query) and the load description.void
setM2MIncludeJoin(TableJoin includeTableJoin)
Set the extra join for a M2M lazy load.void
setManualId()
Set to true when we only include the Id property if it is explicitly included in the select().void
setMode(SpiQuery.Mode m)
Set the query mode.ObjectGraphNode
setOrigin(CallOrigin callOrigin)
Return the origin point for the query.void
setParentNode(ObjectGraphNode node)
Set the profile point of the bean or collection that is lazy loading.void
setPersistenceContext(PersistenceContext transactionContext)
Set an explicit TransactionContext (typically for a refresh query).void
setProfilePath(String label, String relativePath, ProfileLocation profileLocation)
Set the on a secondary query given the label, relativePath and profile location of the parent query.void
setProfilingListener(ProfilingListener manager)
This has the effect of turning on profiling for this query.void
setSelectId()
Set the query to select the id property only.void
setSingleAttribute()
Mark the query as selecting a single attribute.void
setTenantId(Object tenantId)
Set the tenantId to use for lazy loading.void
setType(SpiQuery.Type type)
Set the query type (List, Set etc).void
setupForDeleteOrUpdate()
Set the query to be a delete query.void
setUsageProfiling(boolean usageProfiling)
Set to false if this query should not be included in the AutoTune usage profiling information.void
simplifyExpressions()
Simplify nested expression lists where possible.boolean
tuneFetchProperties(OrmQueryDetail detail)
AutoTune tune the detail specifying properties to select on already defined joins and adding extra joins where they are missing.Set<String>
validate(BeanType<T> desc)
Validate the query returning the set of properties with unknown paths.-
Methods inherited from interface io.ebean.Query
alias, apply, asDraft, asDto, asOf, asUpdate, cancel, delete, delete, exists, fetch, fetch, fetch, fetch, fetchCache, fetchCache, fetchLazy, fetchLazy, fetchQuery, fetchQuery, filterMany, findCount, findEach, findEachWhile, findFutureCount, findFutureIds, findFutureList, findIds, findIterate, findLargeStream, findList, findMap, findOne, findOneOrEmpty, findPagedList, findSet, findSingleAttribute, findSingleAttributeList, findStream, findVersions, findVersionsBetween, forUpdate, forUpdateNoWait, forUpdateSkipLocked, getBeanType, getExpressionFactory, getGeneratedSql, getId, getInheritType, getQueryType, having, having, isAutoTuned, isCountDistinct, isForUpdate, order, order, orderBy, orderBy, orderById, select, select, setAllowLoadErrors, setAutoTune, setBaseTable, setBeanCacheMode, setBufferFetchSizeHint, setCountDistinct, setDisableLazyLoading, setDisableReadAuditing, setDistinct, setDocIndexName, setFirstRow, setId, setIncludeSoftDeletes, setInheritType, setLabel, setLazyLoadBatchSize, setLoadBeanCache, setMapKey, setMaxRows, setOrder, setOrderBy, setParameter, setParameter, setParameter, setParameters, setPersistenceContextScope, setProfileLocation, setRawSql, setReadOnly, setTimeout, setUseCache, setUseDocStore, setUseQueryCache, setUseQueryCache, text, update, update, usingConnection, usingDatabase, usingTransaction, validate, where, where
-
-
-
-
Method Detail
-
profileEventId
String profileEventId()
Return the profile event id based on query mode and type.
-
getProfileId
String getProfileId()
Return the id used to identify a particular query for the given bean type.
-
getProfileLocation
ProfileLocation getProfileLocation()
Return the profile location for this query.
-
getPlanLabel
String getPlanLabel()
Return the label manually set on the query or from the profile location.
-
isFindById
boolean isFindById()
Return true if this is a "find by id" query. This includes a check for a single "equal to" expression for the Id.
-
isFindAll
boolean isFindAll()
Return true if this is a "find all" query. Used to set a "find all" profile location if necessary.
-
isAutoTunable
boolean isAutoTunable()
Return true if AutoTune should be attempted on this query.
-
isNativeSql
boolean isNativeSql()
Return true if this is a native sql query.
-
getNativeSql
String getNativeSql()
Return the unmodified native sql query (with named params etc).
-
getForUpdateMode
Query.ForUpdate getForUpdateMode()
Return the ForUpdate mode.- Specified by:
getForUpdateMode
in interfaceQuery<T>
-
getBeanDescriptor
BeanDescriptor<T> getBeanDescriptor()
Return the bean descriptor for this query.
-
getQueryPlanKey
Object getQueryPlanKey()
Return the query plan key.
-
isUseDocStore
boolean isUseDocStore()
Return true if this query should be executed against the doc store.
-
getDocIndexName
String getDocIndexName()
For doc store query return the document index name to search against. This is for partitioned indexes (like daily logstash indexes etc).
-
getPersistenceContextScope
PersistenceContextScope getPersistenceContextScope()
Return the PersistenceContextScope that this query should use.This can be null and in that case use the default scope.
-
getOriginKey
String getOriginKey()
Return the origin key.
-
getLazyLoadBatchSize
int getLazyLoadBatchSize()
Return the default lazy load batch size.
-
selectAllForLazyLoadProperty
boolean selectAllForLazyLoadProperty()
Return true if select all properties was used to ensure the property invoking a lazy load was included in the query.
-
setProfilePath
void setProfilePath(String label, String relativePath, ProfileLocation profileLocation)
Set the on a secondary query given the label, relativePath and profile location of the parent query.
-
setMode
void setMode(SpiQuery.Mode m)
Set the query mode.
-
getMode
SpiQuery.Mode getMode()
Return the query mode.
-
getTemporalMode
SpiQuery.TemporalMode getTemporalMode()
Return the Temporal mode for the query.
-
isVersionsBetween
boolean isVersionsBetween()
Return true if this is a find versions between query.
-
getVersionStart
Timestamp getVersionStart()
Return the find versions start timestamp.
-
getVersionEnd
Timestamp getVersionEnd()
Return the find versions end timestamp.
-
isAsOfQuery
boolean isAsOfQuery()
Return true if this is a 'As Of' query.
-
isAsDraft
boolean isAsDraft()
Return true if this is a 'As Draft' query.
-
isIncludeSoftDeletes
boolean isIncludeSoftDeletes()
Return true if this query includes soft deleted rows.
-
isAsOfBaseTable
boolean isAsOfBaseTable()
Return true if the base table is using history.
-
setAsOfBaseTable
void setAsOfBaseTable()
Set when the base table is using history.
-
incrementAsOfTableCount
void incrementAsOfTableCount()
Increment the counter of tables used in 'As Of' query.
-
getAsOfTableCount
int getAsOfTableCount()
Return the table alias used for the base table.
-
addSoftDeletePredicate
void addSoftDeletePredicate(String softDeletePredicate)
-
getSoftDeletePredicates
List<String> getSoftDeletePredicates()
-
copy
SpiQuery<T> copy(SpiEbeanServer server)
Return a copy of the query attaching to a different EbeanServer.
-
getType
SpiQuery.Type getType()
Return the type of query (List, Set, Map, Bean, rowCount etc).
-
setType
void setType(SpiQuery.Type type)
Set the query type (List, Set etc).
-
getLoadDescription
String getLoadDescription()
Return a more detailed description of the lazy or query load.
-
getLoadMode
String getLoadMode()
Return the load mode (+lazy or +query).
-
setLazyLoadForParents
void setLazyLoadForParents(BeanPropertyAssocMany<?> many)
This becomes a lazy loading query for a many relationship.
-
getLazyLoadMany
BeanPropertyAssocMany<?> getLazyLoadMany()
Return the lazy loading 'many' property.
-
setLoadDescription
void setLoadDescription(String loadMode, String loadDescription)
Set the load mode (+lazy or +query) and the load description.
-
checkNamedParameters
void checkNamedParameters()
Check that the named parameters have had their values set.
-
createNamedParameter
SpiNamedParam createNamedParameter(String parameterName)
Create a named parameter placeholder.
-
getManyWhereJoins
ManyWhereJoins getManyWhereJoins()
Return the joins required to support predicates on the many properties.
-
resetBeanCacheAutoMode
void resetBeanCacheAutoMode(boolean findOne)
Reset AUTO mode to OFF for findList(). Expect explicit cache use with findList().
-
cacheIdLookup
CacheIdLookup<T> cacheIdLookup()
Bean cache lookup for find by ids.
-
naturalKey
NaturalKeyQueryData<T> naturalKey()
Collect natural key data for this query or null if the query does not match the requirements of natural key lookup.
-
getNaturalKeyBindParam
NaturalKeyBindParam getNaturalKeyBindParam()
Return a Natural Key bind parameter if supported by this query.
-
prepareDocNested
void prepareDocNested()
Prepare the query for docstore execution with nested paths.
-
setupForDeleteOrUpdate
void setupForDeleteOrUpdate()
Set the query to be a delete query.
-
setDeleteByIdsPlan
CQueryPlanKey setDeleteByIdsPlan()
Set the query to be delete by ids due to cascading delete.
-
setSelectId
void setSelectId()
Set the query to select the id property only.
-
setSingleAttribute
void setSingleAttribute()
Mark the query as selecting a single attribute.
-
isSingleAttribute
boolean isSingleAttribute()
Return true if this is singleAttribute query.
-
isWithId
boolean isWithId()
Return true if the query should include the Id property.distinct and single attribute queries exclude the Id property.
-
setFilterMany
void setFilterMany(String prop, ExpressionList<?> filterMany)
Set a filter to a join path.
-
setTenantId
void setTenantId(Object tenantId)
Set the tenantId to use for lazy loading.
-
getTenantId
Object getTenantId()
Return the tenantId to use for lazy loading.
-
setLazyLoadManyPath
void setLazyLoadManyPath(String lazyLoadManyPath)
Set the path of the many when +query/+lazy loading query is executed.
-
convertJoins
SpiQuerySecondary convertJoins()
Convert joins as necessary to query joins etc.
-
getPersistenceContext
PersistenceContext getPersistenceContext()
Return the TransactionContext.If no TransactionContext is present on the query then the TransactionContext from the Transaction is used (transaction scoped persistence context).
-
setPersistenceContext
void setPersistenceContext(PersistenceContext transactionContext)
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).
-
isDetailEmpty
boolean isDetailEmpty()
Return true if the query detail has neither select or joins specified.
-
isAutoTune
Boolean isAutoTune()
Return explicit AutoTune setting or null. If null then not explicitly set so we use the default behaviour.
-
getProfilingListener
ProfilingListener getProfilingListener()
If 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).
-
setProfilingListener
void setProfilingListener(ProfilingListener manager)
This has the effect of turning on profiling for this query.
-
setOrigin
ObjectGraphNode setOrigin(CallOrigin callOrigin)
Return 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.
-
setParentNode
void setParentNode(ObjectGraphNode node)
Set 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.
-
setLazyLoadProperty
void setLazyLoadProperty(String lazyLoadProperty)
Set the property that invoked the lazy load and MUST be included in the lazy loading query.
-
getLazyLoadProperty
String getLazyLoadProperty()
Return the property that invoked lazy load.
-
getParentNode
ObjectGraphNode getParentNode()
Used to hook back a lazy loading query to the original query (query point).This will return null or an "original" query.
-
isUsageProfiling
boolean isUsageProfiling()
Return 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.
-
setUsageProfiling
void setUsageProfiling(boolean usageProfiling)
Set to false if this query should not be included in the AutoTune usage profiling information.
-
prepare
CQueryPlanKey prepare(SpiOrmQueryRequest<T> request)
Prepare the query which prepares sub-query expressions and calculates and returns the query plan key.The query plan excludes actual bind values (as they don't effect the query plan).
-
queryBindHash
int queryBindHash()
Calculate a hash based on the bind values used in the query.Combined with queryPlanHash() to return getQueryHash (a unique hash for a query).
-
queryHash
HashQuery queryHash()
Identifies queries that are exactly the same including bind variables.
-
isRawSql
boolean isRawSql()
Return true if this is a RawSql query.
-
checkPagingOrderBy
boolean checkPagingOrderBy()
Return true if the query should have an order by appended automatically.
-
orderByIsEmpty
boolean orderByIsEmpty()
Return true if there is no Order By clause.
-
getOrderBy
OrderBy<T> getOrderBy()
Return the Order By clause or null if there is none defined.
-
getWhereExpressions
SpiExpressionList<T> getWhereExpressions()
Can return null if no expressions where added to the where clause.
-
getHavingExpressions
SpiExpressionList<T> getHavingExpressions()
Can return null if no expressions where added to the having clause.
-
getTextExpression
SpiExpressionList<T> getTextExpression()
Return the text expressions.
-
hasMaxRowsOrFirstRow
boolean hasMaxRowsOrFirstRow()
Returns true if either firstRow or maxRows has been set.
-
isBeanCacheGet
boolean isBeanCacheGet()
Return true if the query should GET against bean cache.
-
isBeanCachePut
boolean isBeanCachePut()
Return true if the query should PUT against the bean cache.
-
isForceHitDatabase
boolean isForceHitDatabase()
Return true if we must hit the DB (Cache reload or select for update).
-
getUseBeanCache
CacheMode getUseBeanCache()
Return the cache mode for using the bean cache (Get and Put).
-
getUseQueryCache
CacheMode getUseQueryCache()
Return the cache mode if this query should use/check the query cache.
-
isReadOnly
Boolean isReadOnly()
Return true if the beans returned by this query should be read only.
-
getTimeout
int getTimeout()
Return the query timeout.
-
getBindParams
BindParams getBindParams()
Return the bind parameters.
-
setDetail
void setDetail(OrmQueryDetail detail)
Replace 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
boolean tuneFetchProperties(OrmQueryDetail detail)
AutoTune tune the detail specifying properties to select on already defined joins and adding extra joins where they are missing.
-
setDefaultRawSqlIfRequired
void setDefaultRawSqlIfRequired()
If this is a RawSql based entity set the default RawSql if not set.
-
setAutoTuned
void setAutoTuned(boolean autoTuned)
Set to true if this query has been tuned by autoTune.
-
getDetail
OrmQueryDetail getDetail()
Return the query detail.
-
getM2mIncludeJoin
TableJoin getM2mIncludeJoin()
Return the extra join for a M2M lazy load.
-
setM2MIncludeJoin
void setM2MIncludeJoin(TableJoin includeTableJoin)
Set the extra join for a M2M lazy load.
-
getMaxRows
int getMaxRows()
Return the maximum number of rows to return in the query.- Specified by:
getMaxRows
in interfaceQuery<T>
-
getFirstRow
int getFirstRow()
Return the index of the first row to return in the query.- Specified by:
getFirstRow
in interfaceQuery<T>
-
isDisableLazyLoading
boolean isDisableLazyLoading()
Return true if lazy loading has been disabled on the query.
-
isDistinct
boolean isDistinct()
Return true if this query has been specified by a user to use DISTINCT.
-
isManualId
boolean isManualId()
Return true if the Id property is manually included in the query (DTO queries).
-
setManualId
void setManualId()
Set to true when we only include the Id property if it is explicitly included in the select().
-
setDefaultSelectClause
void setDefaultSelectClause()
Set default select clauses where none have been explicitly defined.
-
setGeneratedSql
void setGeneratedSql(String generatedSql)
Set the generated sql for debug purposes.
-
setDefaultFetchBuffer
void setDefaultFetchBuffer(int fetchSize)
Set the JDBC fetchSize buffer hint if not explicitly set.
-
getBufferFetchSizeHint
int getBufferFetchSizeHint()
Return the hint for Statement.setFetchSize().
-
isDisableReadAudit
boolean isDisableReadAudit()
Return true if read auditing is disabled on this query.
-
isFutureFetch
boolean isFutureFetch()
Return true if this is a query executing in the background.
-
setFutureFetch
void setFutureFetch(boolean futureFetch)
Set to true to indicate the query is executing in a background thread asynchronously.
-
setFutureFetchAudit
void setFutureFetchAudit(ReadEvent event)
Set the readEvent for future queries (as prepared in foreground thread).
-
getFutureFetchAudit
ReadEvent getFutureFetchAudit()
Read the readEvent for future queries (null otherwise).
-
setCancelableQuery
void setCancelableQuery(CancelableQuery cancelableQuery)
Set the underlying cancelable query (with the PreparedStatement).
-
isCancelled
boolean isCancelled()
Return true if this query has been cancelled.
-
getBaseTable
String getBaseTable()
Return the base table to use if user defined on the query.
-
getAlias
String getAlias()
Return root table alias set byQuery.alias(String)
command.
-
validate
Set<String> validate(BeanType<T> desc)
Validate the query returning the set of properties with unknown paths.
-
getUpdateProperties
OrmUpdateProperties getUpdateProperties()
Return the properties for an update query.
-
simplifyExpressions
void simplifyExpressions()
Simplify nested expression lists where possible.
-
getCountDistinctOrder
CountDistinctOrder getCountDistinctOrder()
Returns the count distinct order setting.
-
handleLoadError
void handleLoadError(String fullName, Exception e)
Handles load errors.
-
-