SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.schema
Class PrimaryKey

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.schema.ReferenceCounter
        |
        +--com.solarmetric.rd.kodo.impl.jdbc.schema.Constraint
              |
              +--com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey

public class PrimaryKey
extends Constraint

Represents a table primary key.


Method Summary
 void addColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
          Add a column to the primary key.
 boolean columnsMatch(com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] pkCols)
          Return true if the given columns match the columns of this key.
 boolean containsColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
          Return true if the pk includes the given column.
 void derefColumns()
          Deref all columns in this key.
 boolean equals(java.lang.Object other)
          Return true if the structure of this primary key matches that of the given one (same table, same columns).
 com.solarmetric.rd.kodo.impl.jdbc.schema.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(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
          Remove a column from the primary key.
 void setColumns(com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols)
          Set the columns the primary key spans.
 void setLogical(boolean logical)
           
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.schema.Constraint
getName, getTable, isDeferred, setDeferred, toString
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.schema.ReferenceCounter
deref, getRefCount, ref
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isLogical

public boolean isLogical()
Description copied from class: Constraint
Return whether this constraint is a logical constraint only; i.e. if it does not exist in the database.

Specified by:
isLogical in class Constraint

setLogical

public void setLogical(boolean logical)

getColumns

public com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getColumns()
Return all the columns the primary key spans.


setColumns

public void setColumns(com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols)
Set the columns the primary key spans.


addColumn

public void addColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Add a column to the primary key.


removeColumn

public boolean removeColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Remove a column from the primary key.

Returns:
true if the column was removed, false if not part of the primary key

containsColumn

public boolean containsColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Return true if the pk includes the given column.


refColumns

public void refColumns()
Ref all columns in this key.


derefColumns

public void derefColumns()
Deref all columns in this key.


equals

public boolean equals(java.lang.Object other)
Return true if the structure of this primary key matches that of the given one (same table, same columns).

Overrides:
equals in class Constraint

columnsMatch

public boolean columnsMatch(com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] pkCols)
Return true if the given columns match the columns of this key.


SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.