|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.persistence Annotation Type NamedNativeQuery
Implements:
Annotation
@Target(value=TYPE)@Retention(value=RUNTIME)
此类用于指定本机 SQL 指定的查询。查询名称的范围限制在持久性单元内。
since |
|
Is used to specify a native SQL named query. Query names are scoped to the persistence unit.
- Since:
- Java Persistence 1.0
Required Element Summary | |
---|---|
String |
name
Is used to refer to the query when using the EntityManager
methods that create query objects. |
String |
query
The SQL query string |
Optional Element Summary | |
---|---|
QueryHint[] |
hints
Vendor-specific query hints |
Class |
resultClass
The class of the result |
String |
resultSetMapping
The name of a SqlResultSetMapping , as defined in metadata |
Element Detail |
---|
abstract public String
name()
在使用创建查询对象的 EntityManager
方法时用来引用查询。
英文文档:
name
public abstract String name
- Is used to refer to the query when using the
EntityManager
methods that create query objects.
abstract public String
query()
SQL 查询字符串
英文文档:
query
public abstract String query
- The SQL query string
abstract public QueryHint[]
hints()
特定于供应商的查询提示
英文文档:
hints
public abstract QueryHint[] hints
- Vendor-specific query hints
- Default:
- {}
abstract public Class<T>
resultClass()
结果类
英文文档:
resultClass
public abstract Class resultClass
- The class of the result
- Default:
- void.class
abstract public String
resultSetMapping()
SqlResultSetMapping
名称,在元数据中定义
英文文档:
resultSetMapping
public abstract String resultSetMapping
- The name of a
SqlResultSetMapping
, as defined in metadata - Default:
- ""
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!