Package org.hibernate.engine
Class NamedSQLQueryDefinition
java.lang.Object
org.hibernate.engine.NamedQueryDefinition
org.hibernate.engine.NamedSQLQueryDefinition
- All Implemented Interfaces:
Serializable
Definition of a named native SQL query, defined in the mapping metadata.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNamedSQLQueryDefinition(String query, String resultSetRef, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, Map parameterTypes, boolean callable) Deprecated.NamedSQLQueryDefinition(String query, String resultSetRef, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes, boolean callable) This form used to construct a NamedSQLQueryDefinition from the binder code when a resultset-mapping reference is used.NamedSQLQueryDefinition(String query, NativeSQLQueryReturn[] queryReturns, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes, boolean callable) This form used to construct a NamedSQLQueryDefinition from the binder code when a the result-set mapping information is explicitly provided in the query definition (i.e., no resultset-mapping used) -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethods inherited from class org.hibernate.engine.NamedQueryDefinition
getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getParameterTypes, getQuery, getQueryString, getTimeout, isCacheable, isReadOnly, toString
-
Constructor Details
-
NamedSQLQueryDefinition
public NamedSQLQueryDefinition(String query, NativeSQLQueryReturn[] queryReturns, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes, boolean callable) This form used to construct a NamedSQLQueryDefinition from the binder code when a the result-set mapping information is explicitly provided in the query definition (i.e., no resultset-mapping used)- Parameters:
query- The sql query stringqueryReturns- The in-lined query return definitionsquerySpaces- Any specified query spaces (used for auto-flushing)cacheable- Whether the query results are cacheablecacheRegion- If cacheable, the region into which to store the resultstimeout- A JDBC-level timeout to be appliedfetchSize- A JDBC-level fetch-size to be appliedflushMode- The flush mode to use for this querycacheMode- The cache mode to use during execution and subsequent result loadingreadOnly- Whether returned entities should be marked as read-only in the sessioncomment- Any sql comment to be applied to the queryparameterTypes- parameter type mapcallable- Does the query string represent a callable object (i.e., proc)
-
NamedSQLQueryDefinition
public NamedSQLQueryDefinition(String query, String resultSetRef, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes, boolean callable) This form used to construct a NamedSQLQueryDefinition from the binder code when a resultset-mapping reference is used.- Parameters:
query- The sql query stringresultSetRef- The resultset-mapping namequerySpaces- Any specified query spaces (used for auto-flushing)cacheable- Whether the query results are cacheablecacheRegion- If cacheable, the region into which to store the resultstimeout- A JDBC-level timeout to be appliedfetchSize- A JDBC-level fetch-size to be appliedflushMode- The flush mode to use for this querycacheMode- The cache mode to use during execution and subsequent result loadingreadOnly- Whether returned entities should be marked as read-only in the sessioncomment- Any sql comment to be applied to the queryparameterTypes- parameter type mapcallable- Does the query string represent a callable object (i.e., proc)
-
NamedSQLQueryDefinition
public NamedSQLQueryDefinition(String query, String resultSetRef, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, Map parameterTypes, boolean callable) Deprecated.This form used from annotations (?). Essentially the same as the above using a resultset-mapping reference, but without cacheMode, readOnly, and comment. FIXME: annotations do not use it, so it can be remove from my POV- Parameters:
query- The sql query stringresultSetRef- The result-set-mapping namequerySpaces- Any specified query spaces (used for auto-flushing)cacheable- Whether the query results are cacheablecacheRegion- If cacheable, the region into which to store the resultstimeout- A JDBC-level timeout to be appliedfetchSize- A JDBC-level fetch-size to be appliedflushMode- The flush mode to use for this queryparameterTypes- parameter type mapcallable- Does the query string represent a callable object (i.e., proc)
-
-
Method Details
-
getQueryReturns
-
getQuerySpaces
-
isCallable
public boolean isCallable() -
getResultSetRef
-