|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.engine.database.model.Index
public class Index
Information about indices of a table.
Constructor Summary | |
---|---|
|
Index()
Creates a new instance with default characteristics (no name or parent table, small column list size allocation, non-unique). |
protected |
Index(Table table,
List indexColumns)
Creates a new instance for the list of columns composing an index. |
Method Summary | |
---|---|
void |
addColumn(Attributes attrib)
Adds a new column to an index. |
void |
addOption(String key,
String value)
Add an XML Specified option key/value pair to this element's option set. |
String |
getColumnList()
Return a comma delimited string of the columns which compose this index. |
protected List |
getColumnNames()
Returns the list of names of the columns referenced by this index. |
List |
getColumns()
Return the list of local columns. |
String |
getName()
Gets the name of this index. |
String |
getOption(String key)
Get the value that was associated with this key in an XML option element. |
Map |
getOptions()
Gets the full ordered hashtable array of items specified by XML option statements under this element. |
Table |
getTable()
Get the parent Table of the index |
String |
getTableName()
Returns the Name of the table the index is in |
boolean |
isUnique()
Returns the uniqueness of this index. |
void |
loadFromXML(Attributes attrib)
Imports index from an XML specification |
void |
setName(String name)
Set the name of this index. |
void |
setTable(Table parent)
Set the parent Table of the index |
String |
toString()
String representation of the index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Index()
protected Index(Table table, List indexColumns) throws EngineException
Index()
.
table
- The table this index is associated with.indexColumns
- The list of Column
objects which
make up this index. Cannot be empty.
EngineException
- Error generating name.Index()
Method Detail |
---|
public void loadFromXML(Attributes attrib)
attrib
- the xml attributespublic boolean isUnique()
public String getName()
public void setName(String name)
name
- the name of this indexpublic void setTable(Table parent)
parent
- the tablepublic Table getTable()
public String getTableName()
public void addColumn(Attributes attrib)
attrib
- xml attributes for the columnpublic String getColumnList()
public List getColumns()
protected List getColumnNames()
public String toString()
toString
in class Object
public void addOption(String key, String value)
key
- the key of the option.value
- the value of the option.public String getOption(String key)
key
- the key of the option.
public Map getOptions()
Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |