|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kodo.jdbc.schema.ReferenceCounter | +--kodo.jdbc.schema.Constraint | +--kodo.jdbc.schema.PrimaryKey
Represents a table primary key. This class is closely aligned with the
key information available from DatabaseMetaData
.
Constructor Summary | |
PrimaryKey()
Default constructor. |
|
PrimaryKey(String name,
Table table)
Constructor. |
Method Summary | |
void |
addColumn(Column col)
Add a column to the primary key. |
boolean |
columnsMatch(Column[] pkCols)
Return true if the given columns match the columns of this key. |
boolean |
containsColumn(Column col)
Return true if the pk includes the given column. |
void |
derefColumns()
Deref all columns in this key. |
boolean |
equalsPrimaryKey(PrimaryKey pk)
Return true if the structure of this primary key matches that of the given one (same table, same columns). |
Column[] |
getColumns()
Return all the columns the primary key spans. |
boolean |
isLogical()
Return whether this constraint is a logical constraint only; i.e. |
void |
refColumns()
Ref all columns in this key. |
boolean |
removeColumn(Column col)
Remove a column from the primary key. |
void |
setColumns(Column[] cols)
Set the columns the primary key spans. |
void |
setLogical(boolean logical)
|
Methods inherited from class kodo.jdbc.schema.Constraint |
deref, getColumnName, getFullName, getName, getRefCount, getSchemaName, getTable, getTableName, isDeferred, ref, setColumnName, setDeferred, setName, setSchemaName, setTableName, toString |
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 keyMethod Detail |
public boolean isLogical()
Constraint
isLogical
in class Constraint
public void setLogical(boolean logical)
public Column[] getColumns()
public void setColumns(Column[] cols)
public void addColumn(Column col)
public boolean removeColumn(Column col)
public boolean containsColumn(Column col)
public void refColumns()
public void derefColumns()
public boolean equalsPrimaryKey(PrimaryKey pk)
public boolean columnsMatch(Column[] pkCols)
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |