org.jpox.store.rdbms.key
Class PrimaryKey

java.lang.Object
  extended byorg.jpox.store.rdbms.key.Key
      extended byorg.jpox.store.rdbms.key.CandidateKey
          extended byorg.jpox.store.rdbms.key.PrimaryKey

public class PrimaryKey
extends CandidateKey

Representation of the primary key of a table.

Version:
$Revision: 1.8 $

Field Summary
 
Fields inherited from class org.jpox.store.rdbms.key.CandidateKey
columns, name, table
 
Constructor Summary
PrimaryKey(DatastoreContainerObject table)
          Creates a primary key.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equality operator
 java.lang.String toString()
          Stringifier method.
 
Methods inherited from class org.jpox.store.rdbms.key.CandidateKey
addDatastoreField, assertSameDatastoreObject, getColumnList, getColumnList, getColumns, getDatastoreContainerObject, getName, hashCode, setDatastoreField, setMinSize, setName, size, startsWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimaryKey

public PrimaryKey(DatastoreContainerObject table)
Creates a primary key. A default name of the primary key is created by the constructor. This name can be overwritten.

Parameters:
table - Table that this is the PK for
Method Detail

equals

public boolean equals(java.lang.Object obj)
Equality operator

Overrides:
equals in class CandidateKey
Parameters:
obj - The object to compare against
Returns:
Whether they are equal

toString

public java.lang.String toString()
Stringifier method. Generates a form of the PK ready to be used in a DDL statement. e.g PRIMARY KEY (col1,col2)

Overrides:
toString in class CandidateKey
Returns:
The string form of this object. Ready to be used in a DDL statement.


Copyright © -2007 . All Rights Reserved.