注释类型 NamedNativeQuery
-
@Target({TYPE,PACKAGE}) @Retention(RUNTIME) @Repeatable(NamedNativeQueries.class) public @interface NamedNativeQuery
ExtendsNamedNativeQuerywith Hibernate features.- 作者:
- Emmanuel Bernard
- 另请参阅:
SQLQuery
-
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 booleancacheableWhether the query (results) is cacheable or not.CacheModeTypecacheModeThe cache mode used for this query.StringcacheRegionIf the query results are cacheable, name the query cache region to use.booleancallableDoes the SQL (query()) represent a call to a procedure/function?StringcommentA comment added to the SQL query.intfetchSizeThe number of rows fetched by the JDBC Driver per trip.FlushModeTypeflushModeThe flush mode for the query.booleanreadOnlyWhether the results should be read-only.ClassresultClassThe result Class.StringresultSetMappingThe name of a SQLResultSetMapping to use.inttimeoutThe query timeout (in seconds).
-
-
-
元素详细资料
-
name
String name
The name. It is a named query after all :)
-
-
-
query
String query
The SQL query string.
-
-
-
resultClass
Class resultClass
The result Class. Should not be used in conjunction withresultSetMapping()- 默认值:
- void.class
-
-
-
resultSetMapping
String resultSetMapping
The name of a SQLResultSetMapping to use. Should not be used in conjunction withresultClass().- 默认值:
- ""
-
-
-
flushMode
FlushModeType flushMode
The flush mode for the query.- 默认值:
- org.hibernate.annotations.FlushModeType.PERSISTENCE_CONTEXT
-
-
-
cacheRegion
String cacheRegion
If the query results are cacheable, name the query cache region to use.- 默认值:
- ""
-
-
-
callable
boolean callable
Does the SQL (query()) represent a call to a procedure/function?- 默认值:
- false
-
-
-
comment
String comment
A comment added to the SQL query. Useful when engaging with DBA.- 默认值:
- ""
-
-
-
cacheMode
CacheModeType cacheMode
The cache mode used for this query. This refers to entities/collections returned from the query.- 默认值:
- org.hibernate.annotations.CacheModeType.NORMAL
-
-