Package org.hibernate.annotations
Annotation Type NamedNativeQuery
Extends
NamedNativeQuery 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 usebooleancomment 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 name -
query
String query -
resultClass
Class resultClass- Default:
void.class
-
resultSetMapping
String resultSetMapping- Default:
""
-
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
-
callable
boolean callable- Default:
false
-
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
-