|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.persistence Annotation Type PersistenceUnit
Implements:
Annotation
@Target(value={TYPE, METHOD, FIELD})@Retention(value=RUNTIME)
表示对
EntityManagerFactory
的依赖性。
since |
|
Expresses a dependency on an EntityManagerFactory
.
- Since:
- Java Persistence 1.0
Optional Element Summary | |
---|---|
String |
name
The name by which the entity manager factory is to be accessed in the environment referencing context, and is not needed when dependency injection is used. |
String |
unitName
The name of the persistence unit as defined in the persistence.xml file. |
abstract public String
name()
在环境引用上下文中访问实体管理器工厂所使用的名称,使用依赖关系注入时不需要此名称。
英文文档:
name
public abstract String name
- The name by which the entity manager factory is to be accessed
in the environment referencing context, and is not needed when
dependency injection is used.
- Default:
- ""
abstract public String
unitName()
persistence.xml 文件中定义的持久性单元的名称。如果指定,则可以在 JNDI 中访问的实体管理器工厂的持久性单元必须拥有相同的名称。
英文文档:
unitName
public abstract String unitName
- The name of the persistence unit as defined in the persistence.xml
file. If specified, the persistence unit for the entity manager factory
that is accessible in JNDI must have the same name.
- 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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!