Package org.hibernate.annotations
Annotation Type NamedQuery
Extends
NamedQuery with Hibernate features-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanmark the query as cacheable or notthe cache mode used for this querythe cache region to usecomment added to the SQL query, useful for the DBAintthe number of rows fetched by the JDBC Driver per roundtripthe flush mode for the querybooleanmarks whether the results are fetched in read-only mode or notintthe query timeout in seconds
-
Element Details
-
name
String namethe name of the NamedQuery -
query
String querythe Query String for the NamedQuery -
flushMode
FlushModeType flushModethe flush mode for the query- Default:
PERSISTENCE_CONTEXT
-
cacheable
boolean cacheablemark the query as cacheable or not- Default:
false
-
cacheRegion
String cacheRegionthe cache region to use- Default:
""
-
fetchSize
int fetchSizethe number of rows fetched by the JDBC Driver per roundtrip- Default:
-1
-
timeout
int timeoutthe query timeout in seconds- Default:
-1
-
comment
String commentcomment added to the SQL query, useful for the DBA- Default:
""
-
cacheMode
CacheModeType cacheModethe cache mode used for this query- Default:
NORMAL
-
readOnly
boolean readOnlymarks whether the results are fetched in read-only mode or not- Default:
false
-