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

java.lang.Object
  extended byorg.apache.torque.engine.database.model.Index
      extended byorg.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,v 1.7 2001/11/08 17:20:52 mpoeschl Exp $
Author:
Jason van Zyl, Daniel Rall

Field Summary
 
Fields inherited from class org.apache.torque.engine.database.model.Index
 
Constructor Summary
Unique()
          Creates a new instance.
 
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, getColumnList, getColumnNames, getColumns, getIndexColumnList, getIndexColumns, getIndexName, getIsUnique, getName, getTable, getTableName, loadFromXML, setIndexName, setName, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Unique

public Unique()
Creates a new instance.

Method Detail

isUnique

public final boolean isUnique()
Returns true.

Overrides:
isUnique in class Index

toString

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

Overrides:
toString in class Index


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