@Target(value={TYPE,PACKAGE}) @Retention(value=RUNTIME) @Repeatable(value=NamedNativeQueries.class) public @interface NamedNativeQuery
Extends NamedNativeQuery
with Hibernate features.
SQLQuery
Modifier and Type | Required Element and Description |
---|---|
String |
name
The name.
|
String |
query
The SQL query string.
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
cacheable
Whether the query (results) is cacheable or not.
|
CacheModeType |
cacheMode
The cache mode used for this query.
|
String |
cacheRegion
If the query results are cacheable, name the query cache region to use.
|
boolean |
callable
Does the SQL (
query() ) represent a call to a procedure/function? |
String |
comment
A comment added to the SQL query.
|
int |
fetchSize
The number of rows fetched by the JDBC Driver per trip.
|
FlushModeType |
flushMode
The flush mode for the query.
|
boolean |
readOnly
Whether the results should be read-only.
|
Class |
resultClass
The result Class.
|
String |
resultSetMapping
The name of a SQLResultSetMapping to use.
|
int |
timeout
The query timeout (in seconds).
|
public abstract String name
The name. It is a named query after all :)
public abstract String query
The SQL query string.
public abstract Class resultClass
The result Class. Should not be used in conjunction with resultSetMapping()
public abstract String resultSetMapping
The name of a SQLResultSetMapping to use. Should not be used in conjunction with resultClass()
.
public abstract FlushModeType flushMode
The flush mode for the query.
public abstract boolean cacheable
Whether the query (results) is cacheable or not. Default is false
, that is not cacheable.
public abstract String cacheRegion
If the query results are cacheable, name the query cache region to use.
public abstract int fetchSize
The number of rows fetched by the JDBC Driver per trip.
public abstract int timeout
The query timeout (in seconds). Default is no timeout.
public abstract boolean callable
Does the SQL (query()
) represent a call to a procedure/function?
public abstract String comment
A comment added to the SQL query. Useful when engaging with DBA.
public abstract CacheModeType cacheMode
The cache mode used for this query. This refers to entities/collections returned from the query.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.