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

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

public class Index
extends java.lang.Object

A Class for information about indices of a table

Version:
$Id$
Author:
Jason van Zyl

Field Summary
private  java.util.List indexColumns
           
private  java.lang.String indexName
           
private  boolean isUnique
           
private  Table parentTable
           
 
Constructor Summary
Index()
          Default Constructor
 
Method Summary
 void addColumn(org.xml.sax.Attributes attrib)
          adds a new column to an index
 java.lang.String getIndexColumnList()
          Return a comma delimited string of the index columns
 java.util.List getIndexColumns()
          Return the vector of local columns.
 java.lang.String getIndexName()
          Get the name of the index
 boolean getIsUnique()
          Get unique attribute of the index
 Table getTable()
          Get the parent Table of the index
 java.lang.String getTableName()
          Returns the Name of the table the index is in
 void loadFromXML(org.xml.sax.Attributes attrib)
          Imports index from an XML specification
private  java.lang.String makeColumnList(java.util.List cols)
          Creates a list of columns delimited by commas
 void setIndexName(java.lang.String indexName)
          Set the name of the index
 void setTable(Table parent)
          Set the parent Table of the index
 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

isUnique

private boolean isUnique
Constructor Detail

Index

public Index()
Default Constructor
Method Detail

loadFromXML

public void loadFromXML(org.xml.sax.Attributes attrib)
Imports index from an XML specification

getIsUnique

public boolean getIsUnique()
Get unique attribute of the index

getIndexName

public java.lang.String getIndexName()
Get the name of the index

setIndexName

public void setIndexName(java.lang.String indexName)
Set the name of the index

setTable

public void setTable(Table parent)
Set the parent Table of the index

getTable

public Table getTable()
Get the parent Table of the index

getTableName

public java.lang.String getTableName()
Returns the Name of the table the index 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

getIndexColumnList

public java.lang.String getIndexColumnList()
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.