Top Description Fields Constructors Methods
org.hibernate.engine.spi

public Class NamedSQLQueryDefinition

extends NamedQueryDefinition
Class Inheritance
Imports
java.util.List, .Map, org.hibernate.CacheMode, .FlushMode, org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn

Definition of a named native SQL query, defined in the mapping metadata.
Authors
Max Andersen, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final boolean
private NativeSQLQueryReturn[]
private final List<String>
private String

Constructor Summary

AccessConstructor and Description
public
NamedSQLQueryDefinition(String
The name of named query
name
,
String
The sql query string
query
,
NativeSQLQueryReturn[]
The in-lined query return definitions
queryReturns
,
List<String>
Any specified query spaces (used for auto-flushing)
querySpaces
,
boolean
Whether the query results are cacheable
cacheable
,
String
If cacheable, the region into which to store the results
cacheRegion
,
Integer
A JDBC-level timeout to be applied
timeout
,
Integer
A JDBC-level fetch-size to be applied
fetchSize
,
FlushMode
The flush mode to use for this query
flushMode
,
CacheMode
The cache mode to use during execution and subsequent result loading
cacheMode
,
boolean
Whether returned entities should be marked as read-only in the session
readOnly
,
String
Any sql comment to be applied to the query
comment
,
Map<K, V>
parameter type map
parameterTypes
,
boolean
Does the query string represent a callable object (i.e., proc)
callable
)

Deprecated Use NamedSQLQueryDefinitionBuilder instead.
This form was initially used to construct a NamedSQLQueryDefinition from the binder code when the result-set mapping information is not explicitly provided in the query definition (i.e., no resultset-mapping used).
public
NamedSQLQueryDefinition(String
The name of named query
name
,
String
The sql query string
query
,
String
The resultset-mapping name
resultSetRef
,
List<String>
Any specified query spaces (used for auto-flushing)
querySpaces
,
boolean
Whether the query results are cacheable
cacheable
,
String
If cacheable, the region into which to store the results
cacheRegion
,
Integer
A JDBC-level timeout to be applied
timeout
,
Integer
A JDBC-level fetch-size to be applied
fetchSize
,
FlushMode
The flush mode to use for this query
flushMode
,
CacheMode
The cache mode to use during execution and subsequent result loading
cacheMode
,
boolean
Whether returned entities should be marked as read-only in the session
readOnly
,
String
Any sql comment to be applied to the query
comment
,
Map<K, V>
parameter type map
parameterTypes
,
boolean
Does the query string represent a callable object (i.e., proc)
callable
)

Deprecated Use NamedSQLQueryDefinitionBuilder instead.
This form was initially used to construct a NamedSQLQueryDefinition from the binder code when a resultset-mapping reference is used.
pack-priv
NamedSQLQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map<K, V> parameterTypes, Integer firstResult, Integer maxResults, String resultSetRef, List<String> querySpaces, boolean callable, NativeSQLQueryReturn[] queryReturns, Boolean passDistinctThrough)

Method Summary

Modifier and TypeMethod and Description
public void
public NativeSQLQueryReturn[]
public List<String>
public String
public boolean
public NamedSQLQueryDefinition
Inherited from org.hibernate.engine.spi.NamedQueryDefinition:
getCacheModegetCacheRegiongetCommentgetFetchSizegetFirstResultgetFlushModegetLockOptionsgetMaxResultsgetNamegetParameterTypesgetPassDistinctThroughgetQuerygetQueryStringgetTimeoutisCacheableisReadOnlytoString

Field Detail

callableback to summary
private final boolean callable
queryReturnsback to summary
private NativeSQLQueryReturn[] queryReturns
querySpacesback to summary
private final List<String> querySpaces
resultSetRefback to summary
private String resultSetRef

Constructor Detail

NamedSQLQueryDefinitionback to summary
public NamedSQLQueryDefinition(String name, String query, NativeSQLQueryReturn[] queryReturns, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map<K, V> parameterTypes, boolean callable)

Deprecated

Use NamedSQLQueryDefinitionBuilder instead.

This form was initially used to construct a NamedSQLQueryDefinition from the binder code when the result-set mapping information is not explicitly provided in the query definition (i.e., no resultset-mapping used).

Parameters
name:String

The name of named query

query:String

The sql query string

queryReturns:NativeSQLQueryReturn[]

The in-lined query return definitions

querySpaces:List<String>

Any specified query spaces (used for auto-flushing)

cacheable:boolean

Whether the query results are cacheable

cacheRegion:String

If cacheable, the region into which to store the results

timeout:Integer

A JDBC-level timeout to be applied

fetchSize:Integer

A JDBC-level fetch-size to be applied

flushMode:FlushMode

The flush mode to use for this query

cacheMode:CacheMode

The cache mode to use during execution and subsequent result loading

readOnly:boolean

Whether returned entities should be marked as read-only in the session

comment:String

Any sql comment to be applied to the query

parameterTypes:Map<K, V>

parameter type map

callable:boolean

Does the query string represent a callable object (i.e., proc)

Annotations
@Deprecated
NamedSQLQueryDefinitionback to summary
public NamedSQLQueryDefinition(String name, String query, String resultSetRef, List<String> querySpaces, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map<K, V> parameterTypes, boolean callable)

Deprecated

Use NamedSQLQueryDefinitionBuilder instead.

This form was initially used to construct a NamedSQLQueryDefinition from the binder code when a resultset-mapping reference is used.

Parameters
name:String

The name of named query

query:String

The sql query string

resultSetRef:String

The resultset-mapping name

querySpaces:List<String>

Any specified query spaces (used for auto-flushing)

cacheable:boolean

Whether the query results are cacheable

cacheRegion:String

If cacheable, the region into which to store the results

timeout:Integer

A JDBC-level timeout to be applied

fetchSize:Integer

A JDBC-level fetch-size to be applied

flushMode:FlushMode

The flush mode to use for this query

cacheMode:CacheMode

The cache mode to use during execution and subsequent result loading

readOnly:boolean

Whether returned entities should be marked as read-only in the session

comment:String

Any sql comment to be applied to the query

parameterTypes:Map<K, V>

parameter type map

callable:boolean

Does the query string represent a callable object (i.e., proc)

Annotations
@Deprecated
NamedSQLQueryDefinitionback to summary
pack-priv NamedSQLQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map<K, V> parameterTypes, Integer firstResult, Integer maxResults, String resultSetRef, List<String> querySpaces, boolean callable, NativeSQLQueryReturn[] queryReturns, Boolean passDistinctThrough)

Method Detail

addQueryReturnsback to summary
public void addQueryReturns(NativeSQLQueryReturn[] queryReturnsToAdd)
getQueryReturnsback to summary
public NativeSQLQueryReturn[] getQueryReturns()
getQuerySpacesback to summary
public List<String> getQuerySpaces()
getResultSetRefback to summary
public String getResultSetRef()
isCallableback to summary
public boolean isCallable()
makeCopyback to summary
public NamedSQLQueryDefinition makeCopy(String name)

Overrides org.hibernate.engine.spi.NamedQueryDefinition.makeCopy.

Annotations
@Override