|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: REQUIRED | OPTIONAL | 详细信息: ELEMENT | ||||||||
javax.persistence Annotation Type UniqueConstraint
@Target(value={}) @Retention(value=RUNTIME) public @interface UniqueConstraint
This annotation is used to specify that a unique constraint is to be included in the generated DDL for a primary or secondary table.
Example:
@Entity
@Table(
name="EMPLOYEE",
uniqueConstraints=
@UniqueConstraint(columnNames={"EMP_ID", "EMP_NAME"})
)
public class Employee { ... }
- 从以下版本开始:
- Java Persistence 1.0
| Required Element Summary | |
|---|---|
String[] |
columnNames
(Required) An array of the column names that make up the constraint. |
| 元素详细信息 |
|---|
columnNames
public abstract String[] columnNames
- (Required) An array of the column names that make up the constraint.
|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: REQUIRED | OPTIONAL | 详细信息: ELEMENT | ||||||||
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.