Top Fields Constructors Methods
org.hibernate.query.internal

public Class QueryOptionsImpl

extends Object
implements MutableQueryOptions, AppliedGraph
Class Inheritance
All Implemented Interfaces
org.hibernate.graph.spi.AppliedGraph, org.hibernate.query.spi.MutableQueryOptions, org.hibernate.query.spi.QueryOptions
Imports
java.util.ArrayList, .Collections, .HashSet, .List, .Set, jakarta.persistence.CacheRetrieveMode, .CacheStoreMode, org.checkerframework.checker.nullness.qual.Nullable, org.hibernate.FlushMode, .LockOptions, org.hibernate.graph.GraphSemantic, org.hibernate.graph.spi.AppliedGraph, .RootGraphImplementor, org.hibernate.query.ResultListTransformer, .TupleTransformer, org.hibernate.query.spi.Limit, .MutableQueryOptions

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private CacheRetrieveMode
private CacheStoreMode
private String
private List<String>
private Set<String>
private Set<String>
private Integer
private FlushMode
private GraphSemantic
private final Limit
private final LockOptions
private Boolean
private Boolean
private String
private Boolean
private ResultListTransformer<?>
private RootGraphImplementor<?>
private Integer
private TupleTransformer<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public AppliedGraph
public CacheRetrieveMode
getCacheRetrieveMode()

Implements org.hibernate.query.spi.QueryOptions.getCacheRetrieveMode.

Controls whether query results are read from the cache.
public CacheStoreMode
getCacheStoreMode()

Implements org.hibernate.query.spi.QueryOptions.getCacheStoreMode.

Controls whether query results are put into the cache.
public String
getComment()

Implements org.hibernate.query.spi.QueryOptions.getComment.

The SQL comment to apply to the interpreted SQL query, for dialects which support SQL comments
public List<String>
getDatabaseHints()

Implements org.hibernate.query.spi.QueryOptions.getDatabaseHints.

Hints to apply to the interpreted SQL query
public Set<String>
getDisabledFetchProfiles()

Implements org.hibernate.query.spi.QueryOptions.getDisabledFetchProfiles.

The explicitly disabled profiles for this query
public Set<String>
getEnabledFetchProfiles()

Implements org.hibernate.query.spi.QueryOptions.getEnabledFetchProfiles.

The explicitly enabled profiles for this query
public Integer
getFetchSize()

Implements org.hibernate.query.spi.QueryOptions.getFetchSize.

The fetch size to be applied to the JDBC query.
public FlushMode
getFlushMode()

Implements org.hibernate.query.spi.QueryOptions.getFlushMode.

The flush mode to use for the query execution
public @Nullable RootGraphImplementor<?>
public Limit
getLimit()

Implements org.hibernate.query.spi.QueryOptions.getLimit.

The limit to the query results.
public LockOptions
getLockOptions()

Implements org.hibernate.query.spi.QueryOptions.getLockOptions.

Describes the locking to apply to the query results
public Boolean
getQueryPlanCachingEnabled()

Implements org.hibernate.query.spi.QueryOptions.getQueryPlanCachingEnabled.

Should the query plan of the query be cached?
public String
getResultCacheRegionName()

Implements org.hibernate.query.spi.QueryOptions.getResultCacheRegionName.

The query cache region in which the results should be cached.
public ResultListTransformer<?>
getResultListTransformer()

Implements org.hibernate.query.spi.QueryOptions.getResultListTransformer.

Transformer applied to the query to transform the structure of the overall results
public @Nullable GraphSemantic
getSemantic()

Implements org.hibernate.graph.spi.AppliedGraph.getSemantic.

The semantic (fetch/load) under which the graph should be applied
public Integer
getTimeout()

Implements org.hibernate.query.spi.QueryOptions.getTimeout.

The timeout to apply to the query.
public TupleTransformer<?>
getTupleTransformer()

Implements org.hibernate.query.spi.QueryOptions.getTupleTransformer.

Transformer applied to the query to transform the structure of each "row" in the results
public Boolean
isReadOnly()

Implements org.hibernate.query.spi.QueryOptions.isReadOnly.

Should entities returned from the query be marked read-only.
public Boolean
isResultCachingEnabled()

Implements org.hibernate.query.spi.QueryOptions.isResultCachingEnabled.

Should results from the query be cached?
public void
public void
public void
public void
setFetchSize(Integer fetchSize)

public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheRetrieveModeback to summary
private CacheRetrieveMode cacheRetrieveMode
cacheStoreModeback to summary
private CacheStoreMode cacheStoreMode
commentback to summary
private String comment
databaseHintsback to summary
private List<String> databaseHints
disabledFetchProfilesback to summary
private Set<String> disabledFetchProfiles
enabledFetchProfilesback to summary
private Set<String> enabledFetchProfiles
fetchSizeback to summary
private Integer fetchSize
flushModeback to summary
private FlushMode flushMode
graphSemanticback to summary
private GraphSemantic graphSemantic
limitback to summary
private final Limit limit
lockOptionsback to summary
private final LockOptions lockOptions
queryPlanCachingEnabledback to summary
private Boolean queryPlanCachingEnabled
readOnlyEnabledback to summary
private Boolean readOnlyEnabled
resultCacheRegionNameback to summary
private String resultCacheRegionName
resultCachingEnabledback to summary
private Boolean resultCachingEnabled
resultListTransformerback to summary
private ResultListTransformer<?> resultListTransformer
rootGraphback to summary
private RootGraphImplementor<?> rootGraph
timeoutback to summary
private Integer timeout
tupleTransformerback to summary
private TupleTransformer<?> tupleTransformer

Constructor Detail

QueryOptionsImplback to summary
public QueryOptionsImpl()

Method Detail

addDatabaseHintback to summary
public void addDatabaseHint(String hint)

Implements org.hibernate.query.spi.MutableQueryOptions.addDatabaseHint.

Doc from org.hibernate.query.spi.MutableQueryOptions.addDatabaseHint.

Corollary to getDatabaseHints()

Annotations
@Override
applyGraphback to summary
public void applyGraph(RootGraphImplementor<?> rootGraph, GraphSemantic graphSemantic)

Implements org.hibernate.query.spi.MutableQueryOptions.applyGraph.

Annotations
@Override
disableFetchProfileback to summary
public void disableFetchProfile(String profileName)

Implements org.hibernate.query.spi.MutableQueryOptions.disableFetchProfile.

Annotations
@Override
enableFetchProfileback to summary
public void enableFetchProfile(String profileName)

Implements org.hibernate.query.spi.MutableQueryOptions.enableFetchProfile.

Annotations
@Override
getAppliedGraphback to summary
public AppliedGraph getAppliedGraph()

Implements org.hibernate.query.spi.QueryOptions.getAppliedGraph.

Doc from org.hibernate.query.spi.QueryOptions.getAppliedGraph.

JPA jakarta.persistence.EntityGraph explicitly applied to the query.

Annotations
@Override
getCacheRetrieveModeback to summary
public CacheRetrieveMode getCacheRetrieveMode()

Implements org.hibernate.query.spi.QueryOptions.getCacheRetrieveMode.

Doc from org.hibernate.query.spi.QueryOptions.getCacheRetrieveMode.

Controls whether query results are read from the cache. No effect unless isResultCachingEnabled returns true

Annotations
@Override
getCacheStoreModeback to summary
public CacheStoreMode getCacheStoreMode()

Implements org.hibernate.query.spi.QueryOptions.getCacheStoreMode.

Doc from org.hibernate.query.spi.QueryOptions.getCacheStoreMode.

Controls whether query results are put into the cache. No effect unless isResultCachingEnabled returns true

Annotations
@Override
getCommentback to summary
public String getComment()

Implements org.hibernate.query.spi.QueryOptions.getComment.

Doc from org.hibernate.query.spi.QueryOptions.getComment.

The SQL comment to apply to the interpreted SQL query, for dialects which support SQL comments

Annotations
@Override
getDatabaseHintsback to summary
public List<String> getDatabaseHints()

Implements org.hibernate.query.spi.QueryOptions.getDatabaseHints.

Doc from org.hibernate.query.spi.QueryOptions.getDatabaseHints.

Hints to apply to the interpreted SQL query

Annotations
@Override
getDisabledFetchProfilesback to summary
public Set<String> getDisabledFetchProfiles()

Implements org.hibernate.query.spi.QueryOptions.getDisabledFetchProfiles.

Doc from org.hibernate.query.spi.QueryOptions.getDisabledFetchProfiles.

The explicitly disabled profiles for this query

Annotations
@Override
getEnabledFetchProfilesback to summary
public Set<String> getEnabledFetchProfiles()

Implements org.hibernate.query.spi.QueryOptions.getEnabledFetchProfiles.

Doc from org.hibernate.query.spi.QueryOptions.getEnabledFetchProfiles.

The explicitly enabled profiles for this query

Annotations
@Override
getFetchSizeback to summary
public Integer getFetchSize()

Implements org.hibernate.query.spi.QueryOptions.getFetchSize.

Doc from org.hibernate.query.spi.QueryOptions.getFetchSize.

The fetch size to be applied to the JDBC query.

Annotations
@Override
getFlushModeback to summary
public FlushMode getFlushMode()

Implements org.hibernate.query.spi.QueryOptions.getFlushMode.

Doc from org.hibernate.query.spi.QueryOptions.getFlushMode.

The flush mode to use for the query execution

Annotations
@Override
getGraphback to summary
public @Nullable RootGraphImplementor<?> getGraph()

Implements org.hibernate.graph.spi.AppliedGraph.getGraph.

Doc from org.hibernate.graph.spi.AppliedGraph.getGraph.

The applied graph

Annotations
@Override
getLimitback to summary
public Limit getLimit()

Implements org.hibernate.query.spi.QueryOptions.getLimit.

Doc from org.hibernate.query.spi.QueryOptions.getLimit.

The limit to the query results. May also be accessed via getFirstRow and getMaxRows

Annotations
@Override
getLockOptionsback to summary
public LockOptions getLockOptions()

Implements org.hibernate.query.spi.QueryOptions.getLockOptions.

Doc from org.hibernate.query.spi.QueryOptions.getLockOptions.

Describes the locking to apply to the query results

Annotations
@Override
getQueryPlanCachingEnabledback to summary
public Boolean getQueryPlanCachingEnabled()

Implements org.hibernate.query.spi.QueryOptions.getQueryPlanCachingEnabled.

Doc from org.hibernate.query.spi.QueryOptions.getQueryPlanCachingEnabled.

Should the query plan of the query be cached?

Annotations
@Override
getResultCacheRegionNameback to summary
public String getResultCacheRegionName()

Implements org.hibernate.query.spi.QueryOptions.getResultCacheRegionName.

Doc from org.hibernate.query.spi.QueryOptions.getResultCacheRegionName.

The query cache region in which the results should be cached. No effect unless isResultCachingEnabled returns true

Annotations
@Override
getResultListTransformerback to summary
public ResultListTransformer<?> getResultListTransformer()

Implements org.hibernate.query.spi.QueryOptions.getResultListTransformer.

Doc from org.hibernate.query.spi.QueryOptions.getResultListTransformer.

Transformer applied to the query to transform the structure of the overall results

Annotations
@Override
getSemanticback to summary
public @Nullable GraphSemantic getSemantic()

Implements org.hibernate.graph.spi.AppliedGraph.getSemantic.

Doc from org.hibernate.graph.spi.AppliedGraph.getSemantic.

The semantic (fetch/load) under which the graph should be applied

Annotations
@Override
getTimeoutback to summary
public Integer getTimeout()

Implements org.hibernate.query.spi.QueryOptions.getTimeout.

Doc from org.hibernate.query.spi.QueryOptions.getTimeout.

The timeout to apply to the query. May also be defined at the transaction level using org.hibernate.Transaction#getTimeout

Annotations
@Override
getTupleTransformerback to summary
public TupleTransformer<?> getTupleTransformer()

Implements org.hibernate.query.spi.QueryOptions.getTupleTransformer.

Doc from org.hibernate.query.spi.QueryOptions.getTupleTransformer.

Transformer applied to the query to transform the structure of each "row" in the results

Annotations
@Override
isReadOnlyback to summary
public Boolean isReadOnly()

Implements org.hibernate.query.spi.QueryOptions.isReadOnly.

Doc from org.hibernate.query.spi.QueryOptions.isReadOnly.

Should entities returned from the query be marked read-only.

Annotations
@Override
isResultCachingEnabledback to summary
public Boolean isResultCachingEnabled()

Implements org.hibernate.query.spi.QueryOptions.isResultCachingEnabled.

Doc from org.hibernate.query.spi.QueryOptions.isResultCachingEnabled.

Should results from the query be cached?

Annotations
@Override
setCacheRetrieveModeback to summary
public void setCacheRetrieveMode(CacheRetrieveMode retrieveMode)

Implements org.hibernate.query.spi.MutableQueryOptions.setCacheRetrieveMode.

Doc from org.hibernate.query.spi.MutableQueryOptions.setCacheRetrieveMode.

Corollary to getCacheRetrieveMode

Annotations
@Override
setCacheStoreModeback to summary
public void setCacheStoreMode(CacheStoreMode storeMode)

Implements org.hibernate.query.spi.MutableQueryOptions.setCacheStoreMode.

Doc from org.hibernate.query.spi.MutableQueryOptions.setCacheStoreMode.

Corollary to getCacheStoreMode()

Annotations
@Override
setCommentback to summary
public void setComment(String comment)

Implements org.hibernate.query.spi.MutableQueryOptions.setComment.

Doc from org.hibernate.query.spi.MutableQueryOptions.setComment.

Corollary to getComment()

Annotations
@Override
setFetchSizeback to summary
public void setFetchSize(Integer fetchSize)
setFetchSizeback to summary
public void setFetchSize(int fetchSize)

Implements org.hibernate.query.spi.MutableQueryOptions.setFetchSize.

Doc from org.hibernate.query.spi.MutableQueryOptions.setFetchSize.

Corollary to getFetchSize()

Annotations
@Override
setFlushModeback to summary
public void setFlushMode(FlushMode flushMode)

Implements org.hibernate.query.spi.MutableQueryOptions.setFlushMode.

Doc from org.hibernate.query.spi.MutableQueryOptions.setFlushMode.

Corollary to getFlushMode()

Annotations
@Override
setQueryPlanCachingEnabledback to summary
public void setQueryPlanCachingEnabled(Boolean queryPlanCachingEnabled)

Implements org.hibernate.query.spi.MutableQueryOptions.setQueryPlanCachingEnabled.

Doc from org.hibernate.query.spi.MutableQueryOptions.setQueryPlanCachingEnabled.

Corollary to getQueryPlanCachingEnabled()

Annotations
@Override
setReadOnlyback to summary
public void setReadOnly(boolean readOnly)

Implements org.hibernate.query.spi.MutableQueryOptions.setReadOnly.

Doc from org.hibernate.query.spi.MutableQueryOptions.setReadOnly.

Corollary to isReadOnly()

Annotations
@Override
setResultCacheRegionNameback to summary
public void setResultCacheRegionName(String resultCacheRegionName)

Implements org.hibernate.query.spi.MutableQueryOptions.setResultCacheRegionName.

Doc from org.hibernate.query.spi.MutableQueryOptions.setResultCacheRegionName.

Corollary to getResultCacheRegionName()

Annotations
@Override
setResultCachingEnabledback to summary
public void setResultCachingEnabled(boolean resultCachingEnabled)

Implements org.hibernate.query.spi.MutableQueryOptions.setResultCachingEnabled.

Doc from org.hibernate.query.spi.MutableQueryOptions.setResultCachingEnabled.

Corollary to isResultCachingEnabled()

Annotations
@Override
setResultListTransformerback to summary
public void setResultListTransformer(ResultListTransformer<?> transformer)

Implements org.hibernate.query.spi.MutableQueryOptions.setResultListTransformer.

Annotations
@Override
setTimeoutback to summary
public void setTimeout(Integer timeout)
setTimeoutback to summary
public void setTimeout(int timeout)

Implements org.hibernate.query.spi.MutableQueryOptions.setTimeout.

Doc from org.hibernate.query.spi.MutableQueryOptions.setTimeout.

Corollary to getTimeout()

Annotations
@Override
setTupleTransformerback to summary
public void setTupleTransformer(TupleTransformer<?> transformer)

Implements org.hibernate.query.spi.MutableQueryOptions.setTupleTransformer.

Annotations
@Override