org.apache.turbine.torque.engine.database.model
Class Unique

java.lang.Object
  |
  +--org.apache.turbine.torque.engine.database.model.Unique

public class Unique
extends java.lang.Object

A Class for information about unique indices of a table

Version:
$Id$
Author:
Jason van Zyl

Field Summary
private  java.util.List indexColumns
           
private  java.lang.String indexName
           
private  Table parentTable
           
 
Constructor Summary
Unique()
          Default Constructor
 
Method Summary
 void addColumn(org.xml.sax.Attributes attrib)
          adds a new column to an index
 java.lang.String getColumnList()
          Return a comma delimited string of the index columns
 java.util.List getIndexColumns()
          Return the vector of local columns.
 Table getTable()
          Get the parent Table of the foreign key
 java.lang.String getTableName()
          Returns the Name of the table the foreign key is in
private  java.lang.String makeColumnList(java.util.List cols)
          Creates a list of columns delimited by commas
 void setTable(Table parent)
          Set the parent Table of the foreign key
 java.lang.String toString()
          String representation of the index.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

indexName

private java.lang.String indexName

parentTable

private Table parentTable

indexColumns

private java.util.List indexColumns
Constructor Detail

Unique

public Unique()
Default Constructor
Method Detail

setTable

public void setTable(Table parent)
Set the parent Table of the foreign key

getTable

public Table getTable()
Get the parent Table of the foreign key

getTableName

public java.lang.String getTableName()
Returns the Name of the table the foreign key is in

addColumn

public void addColumn(org.xml.sax.Attributes attrib)
adds a new column to an index

makeColumnList

private java.lang.String makeColumnList(java.util.List cols)
Creates a list of columns delimited by commas

getColumnList

public java.lang.String getColumnList()
Return a comma delimited string of the index columns

getIndexColumns

public java.util.List getIndexColumns()
Return the vector of local columns. You should not edit this vector.

toString

public java.lang.String toString()
String representation of the index. This is an xml representation.
Overrides:
toString in class java.lang.Object


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.