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

java.lang.Object
  extended by org.apache.torque.engine.database.model.Index
      extended by org.apache.torque.engine.database.model.Unique

public class Unique
extends Index

Information about unique columns of a table. This class assumes that in the underlying RDBMS, unique constraints and unique indices are roughly equivalent. For example, adding a unique constraint to a column also creates an index on that column (this is known to be true for MySQL and Oracle).

Version:
$Id: Unique.java 473814 2006-11-11 22:30:30Z tv $
Author:
Jason van Zyl, Daniel Rall

Constructor Summary
Unique()
           
 
Method Summary
 boolean isUnique()
          Returns true.
 java.lang.String toString()
          String representation of the index.
 
Methods inherited from class org.apache.torque.engine.database.model.Index
addColumn, addOption, getColumnList, getColumnNames, getColumns, getName, getOption, getOptions, getTable, getTableName, loadFromXML, setName, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Unique

public Unique()
Method Detail

isUnique

public final boolean isUnique()
Returns true.

Overrides:
isUnique in class Index
Returns:
true

toString

public java.lang.String toString()
String representation of the index. This is an xml representation.

Overrides:
toString in class Index
Returns:
string representation in xml


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.