|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.schema.Constraint
org.apache.openjpa.jdbc.schema.LocalConstraint
org.apache.openjpa.jdbc.schema.Unique
public class Unique
Represents a unique constraint. It can also represent a partial constraint.
| Constructor Summary | |
|---|---|
Unique()
Default constructor without a name. |
|
Unique(java.lang.String name,
Table table)
Construct with given name. |
|
| Method Summary | |
|---|---|
void |
addColumn(Column col)
Adds the given column. |
void |
deref()
|
boolean |
equalsUnique(Unique unq)
Return true if the structure of this primary key matches that of the given one (same table, same columns). |
java.lang.String |
getName()
Gets the name of the constraint. |
int |
getRefCount()
|
boolean |
isAutoNaming()
|
boolean |
isLogical()
Return whether this constraint is a logical constraint only; i.e. |
void |
ref()
|
void |
setName(java.lang.String name)
Set the name of the constraint. |
| Methods inherited from class org.apache.openjpa.jdbc.schema.LocalConstraint |
|---|
columnsMatch, containsColumn, derefColumns, equalsLocalConstraint, getColumns, refColumns, removeColumn, setColumns |
| Methods inherited from class org.apache.openjpa.jdbc.schema.Constraint |
|---|
getColumnName, getFullName, getSchemaName, getTable, getTableName, isDeferred, setColumnName, setDeferred, setSchemaName, setTableName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Unique()
public Unique(java.lang.String name,
Table table)
name - the name of the constraint, if anytable - the table of the constraint| Method Detail |
|---|
public boolean isLogical()
Constraint
isLogical in class Constraintpublic void addColumn(Column col)
addColumn in class LocalConstraintColumn.setNotNull(boolean)public void setName(java.lang.String name)
setName in class Constraintpublic java.lang.String getName()
getName in class Constraintpublic boolean equalsUnique(Unique unq)
public boolean isAutoNaming()
public int getRefCount()
public void ref()
public void deref()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||