|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.schema.ReferenceCounter
org.apache.openjpa.jdbc.schema.Constraint
org.apache.openjpa.jdbc.schema.LocalConstraint
org.apache.openjpa.jdbc.schema.PrimaryKey
public class PrimaryKey
Represents a table primary key. It can also represent a partial key,
aligning with the key information available from
DatabaseMetaData.
| Constructor Summary | |
|---|---|
PrimaryKey()
Default constructor. |
|
PrimaryKey(DBIdentifier name,
Table table)
|
|
PrimaryKey(String name,
Table table)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addColumn(Column col)
Add a column to the constraint. |
boolean |
equalsPrimaryKey(PrimaryKey pk)
Return true if the structure of this primary key matches that of the given one (same table, same columns). |
boolean |
isLogical()
Return whether this constraint is a logical constraint only; i.e. |
(package private) void |
remove()
Called when the constraint is removed from its table. |
void |
setLogical(boolean logical)
|
| 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 |
|---|
getColumnIdentifier, getColumnName, getFullIdentifier, getFullName, getIdentifier, getName, getQualifiedPath, getSchemaIdentifier, getSchemaName, getTable, getTableIdentifier, getTableName, isDeferred, setColumnIdentifier, setColumnName, setDeferred, setIdentifier, setName, setSchemaIdentifier, setSchemaName, setTableIdentifier, setTableName, toString |
| Methods inherited from class org.apache.openjpa.jdbc.schema.ReferenceCounter |
|---|
deref, getRefCount, ref |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrimaryKey()
public PrimaryKey(String name,
Table table)
name - the name of the primary key, if anytable - the table of the primary key
public PrimaryKey(DBIdentifier name,
Table table)
| Method Detail |
|---|
public boolean isLogical()
Constraint
isLogical in class Constraintpublic void setLogical(boolean logical)
void remove()
LocalConstraint
remove in class LocalConstraintpublic void addColumn(Column col)
LocalConstraint
addColumn in class LocalConstraintpublic boolean equalsPrimaryKey(PrimaryKey pk)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||