|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.key.CandidateKey
org.jpox.store.rdbms.key.PrimaryKey
public class PrimaryKey
Representation of the primary key of a table.
| Field Summary | |
|---|---|
protected java.util.List |
columns
Columns that the key relates to. |
protected java.lang.String |
name
Name of the key. |
protected DatastoreContainerObject |
table
Table that the key applies to. |
| Constructor Summary | |
|---|---|
PrimaryKey(DatastoreContainerObject table)
Creates a primary key. |
|
| Method Summary | |
|---|---|
void |
addDatastoreField(DatastoreField col)
Class to add a column to the key |
protected void |
assertSameDatastoreObject(DatastoreField col)
Utility to assert if the column is for a different table. |
boolean |
equals(java.lang.Object obj)
Equality operator |
java.lang.String |
getColumnList()
Accessor for the column list |
static java.lang.String |
getColumnList(java.util.Collection cols)
Method to return the list of columns which the key applies to. |
java.util.List |
getColumns()
Accessor for the columns that the key relates to. |
DatastoreContainerObject |
getDatastoreContainerObject()
Accessor for the table |
java.lang.String |
getName()
Accessor for the key name. |
int |
hashCode()
Hashcode operator. |
protected static void |
setMinSize(java.util.List list,
int size)
|
void |
setName(java.lang.String name)
Mutator for the key name. |
boolean |
startsWith(org.jpox.store.rdbms.key.Key key)
Check if this starts with the same columns specified in key. |
java.lang.String |
toString()
Stringifier method. |
| Methods inherited from class org.jpox.store.rdbms.key.CandidateKey |
|---|
setDatastoreField, size |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected DatastoreContainerObject table
protected java.util.List columns
| Constructor Detail |
|---|
public PrimaryKey(DatastoreContainerObject table)
table - Table that this is the PK for| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class CandidateKeyobj - The object to compare against
public java.lang.String toString()
toString in class CandidateKeypublic java.lang.String getName()
public DatastoreContainerObject getDatastoreContainerObject()
public java.util.List getColumns()
public java.lang.String getColumnList()
public void addDatastoreField(DatastoreField col)
col - The column to addpublic boolean startsWith(org.jpox.store.rdbms.key.Key key)
key.
key - the Key (may be multiple number of columns)
keypublic void setName(java.lang.String name)
name - The key nameprotected void assertSameDatastoreObject(DatastoreField col)
col - The column to compare withpublic int hashCode()
hashCode in class java.lang.Object
protected static void setMinSize(java.util.List list,
int size)
public static java.lang.String getColumnList(java.util.Collection cols)
cols - The columns.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||