Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## org.hibernate.annotations
Annotation Type NamedNativeQuery

    @Target(value={TYPE,PACKAGE})
    @Retention(value=RUNTIME)
    public @interface NamedNativeQuery

Extends `NamedNativeQuery` with Hibernate features

Required Element Summary
`String` | `name`
`String` | `query`

Optional Element Summary
`boolean` | `cacheable` mark the query as cacheable or not
`CacheModeType` | `cacheMode` the cache mode used for this query
`String` | `cacheRegion` the cache region to use
`boolean` | `callable`
`String` | `comment` comment added to the SQL query, useful for the DBA
`int` | `fetchSize` the number of rows fetched by the JDBC Driver per roundtrip
`FlushModeType` | `flushMode` the flush mode for the query
`boolean` | `readOnly` marks whether the results are fetched in read-only mode or not
`Class` | `resultClass`
`String` | `resultSetMapping`
`int` | `timeout` the query timeout in seconds

Element Detail

### name

    public abstract String name

### query

    public abstract String query

### resultClass

    public abstract Class resultClass

  Default:
    void.class

### resultSetMapping

    public abstract String resultSetMapping

  Default:
    ""

### flushMode

    public abstract FlushModeType flushMode

  the flush mode for the query

  Default:
    org.hibernate.annotations.FlushModeType.PERSISTENCE_CONTEXT

### cacheable

    public abstract boolean cacheable

  mark the query as cacheable or not

  Default:
    false

### cacheRegion

    public abstract String cacheRegion

  the cache region to use

  Default:
    ""

### fetchSize

    public abstract int fetchSize

  the number of rows fetched by the JDBC Driver per roundtrip

  Default:
    -1

### timeout

    public abstract int timeout

  the query timeout in seconds

  Default:
    -1

### callable

    public abstract boolean callable

  Default:
    false

### comment

    public abstract String comment

  comment added to the SQL query, useful for the DBA

  Default:
    ""

### cacheMode

    public abstract CacheModeType cacheMode

  the cache mode used for this query

  Default:
    org.hibernate.annotations.CacheModeType.NORMAL

### readOnly

    public abstract boolean readOnly

  marks whether the results are fetched in read-only mode or not

  Default:
    false

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.