|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
javax.persistence Annotation Type UniqueConstraint
@Target(value={}) @Retention(value=RUNTIME) public @interface UniqueConstraint
Implements:
Annotation
@Target(value={})@Retention(value=RUNTIME)
此注释用于指定为主表格或从属表格生成的 DDL 中要包含唯一约束。
示例: @Entity @Table( name="EMPLOYEE", uniqueConstraints= @UniqueConstraint(columnNames={"EMP_ID", "EMP_NAME"}) ) public class Employee { ... }
since |
|
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 { ... }
- Since:
- Java Persistence 1.0
Required Element Summary | |
---|---|
String[] |
columnNames
(Required) An array of the column names that make up the constraint. |
Element Detail |
---|
abstract public String[]
columnNames()
(必须)组成约束的列名称所组成的数组。
英文文档:
columnNames
public abstract String[] columnNames
- (Required) An array of the column names that make up the constraint.
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!