public class PrimaryKey extends LocalConstraint
DatabaseMetaData
.Constructor and Description |
---|
PrimaryKey()
Default constructor.
|
PrimaryKey(DBIdentifier name,
Table table) |
PrimaryKey(String name,
Table table)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Column col)
Add a column to the constraint.
|
void |
deref() |
boolean |
equalsPrimaryKey(PrimaryKey pk)
Return true if the structure of this primary key matches that of
the given one (same table, same columns).
|
int |
getRefCount() |
boolean |
isLogical()
Return whether this constraint is a logical constraint only; i.e.
|
void |
ref() |
void |
setLogical(boolean logical) |
columnsMatch, containsColumn, derefColumns, equalsLocalConstraint, getColumns, refColumns, removeColumn, setColumns
getColumnIdentifier, getColumnName, getFullIdentifier, getFullName, getIdentifier, getName, getQualifiedPath, getSchemaIdentifier, getSchemaName, getTable, getTableIdentifier, getTableName, isDeferred, setColumnIdentifier, setColumnName, setDeferred, setIdentifier, setName, setSchemaIdentifier, setSchemaName, setTableIdentifier, setTableName, toString
public PrimaryKey()
@Deprecated public PrimaryKey(String name, Table table)
name
- the name of the primary key, if anytable
- the table of the primary keypublic PrimaryKey(DBIdentifier name, Table table)
public boolean isLogical()
Constraint
isLogical
in class Constraint
public void setLogical(boolean logical)
public void addColumn(Column col)
LocalConstraint
addColumn
in class LocalConstraint
public boolean equalsPrimaryKey(PrimaryKey pk)
public int getRefCount()
public void ref()
public void deref()
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.