Package org.hibernate.annotations
Annotation Type NamedNativeQuery
-
@Target({TYPE,PACKAGE}) @Retention(RUNTIME) @Repeatable(NamedNativeQueries.class) public @interface NamedNativeQueryExtendsNamedNativeQuerywith Hibernate features.- See Also:
SQLQuery
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancacheableWhether the query (results) is cacheable or not.CacheModeTypecacheModeThe cache mode used for this query.java.lang.StringcacheRegionIf the query results are cacheable, name the query cache region to use.booleancallableDoes the SQL (query()) represent a call to a procedure/function?java.lang.StringcommentA comment added to the SQL query.intfetchSizeThe number of rows fetched by the JDBC Driver per trip.FlushModeTypeflushModeThe flush mode for the query.java.lang.String[]querySpacesThe query spaces to apply for the query.booleanreadOnlyWhether the results should be read-only.java.lang.ClassresultClassThe result Class.java.lang.StringresultSetMappingThe name of a SQLResultSetMapping to use.inttimeoutThe query timeout (in seconds).
-
-
-
-
resultClass
java.lang.Class resultClass
The result Class. Should not be used in conjunction withresultSetMapping()- Default:
- void.class
-
-
-
resultSetMapping
java.lang.String resultSetMapping
The name of a SQLResultSetMapping to use. Should not be used in conjunction withresultClass().- Default:
- ""
-
-
-
flushMode
FlushModeType flushMode
The flush mode for the query.- Default:
- org.hibernate.annotations.FlushModeType.PERSISTENCE_CONTEXT
-
-
-
callable
boolean callable
Does the SQL (query()) represent a call to a procedure/function?- Default:
- false
-
-
-
cacheMode
CacheModeType cacheMode
The cache mode used for this query. This refers to entities/collections returned from the query.- Default:
- org.hibernate.annotations.CacheModeType.NORMAL
-
-
-
querySpaces
java.lang.String[] querySpaces
The query spaces to apply for the query.- See Also:
SynchronizeableQuery
- Default:
- {}
-
-