|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.persistence Annotation Type IdClass
Implements:
Annotation
@Target(value=TYPE)@Retention(value=RUNTIME)
指定映射到实体的多个字段或属性的复合主键类。
主键类中字段或属性的名称必须与实体的主键字段或属性的名称一致,它们的类型也必须相同。
示例: @IdClass(com.acme.EmployeePK.class) @Entity public class Employee { @Id String empName; @Id Date birthDay; ... }
since |
|
Specifies a composite primary key class that is mapped to multiple fields or properties of the entity.
The names of the fields or properties in the primary key class and the primary key fields or properties of the entity must correspond and their types must be the same.
Example: @IdClass(com.acme.EmployeePK.class) @Entity public class Employee { @Id String empName; @Id Date birthDay; ... }
- Since:
- Java Persistence 1.0
Required Element Summary | |
---|---|
Class |
value
Primary key class |
Element Detail |
---|
abstract public Class<T>
value()
主键类
英文文档:
value
public abstract Class value
- Primary key class
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!