com.jgpruitt.datamodeler.core
Class UniqueKey

java.lang.Object
  extended by com.jgpruitt.datamodeler.core.ColumnSet
      extended by com.jgpruitt.datamodeler.core.UniqueKey
All Implemented Interfaces:
java.lang.Iterable<Column>

public class UniqueKey
extends ColumnSet

Models a unique key constraint on a database table

Author:
John Pruitt

Field Summary
protected  java.lang.String comment
           
protected  java.lang.String name
           
protected  Table table
           
 
Fields inherited from class com.jgpruitt.datamodeler.core.ColumnSet
list, map
 
Constructor Summary
UniqueKey(java.lang.String name)
          Constructor
 
Method Summary
 java.lang.String getComment()
          Gets the comment describing the UniqueKey
 java.lang.String getName()
          Gets the name of the UniqueKey
 Table getTable()
          Gets the Table that this UniqueKey constrains
 void setComment(java.lang.String comment)
          Sets the comment describing the UniqueKey
 void setTable(Table table)
          Sets the Table that this UniqueKey constrains
 
Methods inherited from class com.jgpruitt.datamodeler.core.ColumnSet
add, contains, contains, get, get, isEmpty, iterator, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

table

protected Table table

comment

protected java.lang.String comment
Constructor Detail

UniqueKey

public UniqueKey(java.lang.String name)
Constructor

Parameters:
name - the name of the UniqueKey
Method Detail

getName

public java.lang.String getName()
Gets the name of the UniqueKey

Returns:
the name

getTable

public Table getTable()
Gets the Table that this UniqueKey constrains

Returns:
the Table

setTable

public void setTable(Table table)
Sets the Table that this UniqueKey constrains

Parameters:
table - the Table

getComment

public java.lang.String getComment()
Gets the comment describing the UniqueKey

Returns:
the comment

setComment

public void setComment(java.lang.String comment)
Sets the comment describing the UniqueKey

Parameters:
comment - the comment