注释类型 NamedQuery
-
@Target({TYPE,PACKAGE}) @Retention(RUNTIME) @Repeatable(NamedQueries.class) public @interface NamedQuery
ExtendsNamedQuerywith Hibernate features.- 作者:
- Carlos Gonzalez-Cadenas
- 另请参阅:
Query
-
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 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.StringcommentA comment added to the generated SQL query.intfetchSizeThe number of rows fetched by the JDBC Driver per trip.FlushModeTypeflushModeThe flush mode for this query.booleanreadOnlyWhether the results should be read-only.inttimeoutThe query timeout (in seconds).
-
-
-
元素详细资料
-
name
String name
The name of thisNamedQuery.
-
-
-
query
String query
The query string for thisNamedQuery.
-
-
-
flushMode
FlushModeType flushMode
The flush mode for this query.- 默认值:
- org.hibernate.annotations.FlushModeType.PERSISTENCE_CONTEXT
-
-
-
cacheRegion
String cacheRegion
If the query results are cacheable, name the query cache region to use.- 默认值:
- ""
-
-
-
comment
String comment
A comment added to the generated 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
-
-