| 
 | ||||||||||
| 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
public abstract class LocalConstraint
Constraint over local table columns, as opposed to a foreign key which
 spans tables. Column APIs can represent a full constraint or a partial
 constraint, aligning with DatabaseMetaData.
| Constructor Summary | |
|---|---|
| LocalConstraint()Default constructor. | |
| LocalConstraint(DBIdentifier name,
                Table table) | |
| LocalConstraint(String name,
                Table table)Deprecated. | |
| Method Summary | |
|---|---|
|  void | addColumn(Column col)Add a column to the constraint. | 
|  boolean | columnsMatch(Column[] ocols)Return true if the given columns match the columns of this constraint. | 
|  boolean | containsColumn(Column col)Return true if the pk includes the given column. | 
|  void | derefColumns()Deref all columns in this constraint. | 
| protected  boolean | equalsLocalConstraint(LocalConstraint lc)Return true if the columns of this constraint matches that of the given one. | 
|  Column[] | getColumns()Return all the columns the constraint spans. | 
|  void | refColumns()Ref all columns in this constraint. | 
| (package private)  void | remove()Called when the constraint is removed from its table. | 
|  boolean | removeColumn(Column col)Remove a column from the constraint. | 
|  void | setColumns(Column[] cols)Set the columns the constraint spans. | 
| Methods inherited from class org.apache.openjpa.jdbc.schema.Constraint | 
|---|
| getColumnIdentifier, getColumnName, getFullIdentifier, getFullName, getIdentifier, getName, getQualifiedPath, getSchemaIdentifier, getSchemaName, getTable, getTableIdentifier, getTableName, isDeferred, isLogical, 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 LocalConstraint()
public LocalConstraint(String name,
                       Table table)
name - the name of the constraint, if anytable - the table of the constraint
public LocalConstraint(DBIdentifier name,
                       Table table)
| Method Detail | 
|---|
void remove()
remove in class Constraintpublic 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 columnsMatch(Column[] ocols)
protected boolean equalsLocalConstraint(LocalConstraint lc)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||