org.apache.ddlutils.model
Interface Index

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
NonUniqueIndex

public interface Index
extends Cloneable, Serializable

Represents an index definition for a table which may be either unique or non-unique.

Version:
$Revision: 365443 $
Author:
Thomas Dudziak

Method Summary
 void addColumn(IndexColumn column)
          Adds a column that makes up this index.
 IndexColumn getColumn(int idx)
          Returns the indicated column making up this index.
 int getColumnCount()
          Returns the number of columns that make up this index.
 IndexColumn[] getColumns()
          Returns the columns that make up this index.
 String getName()
          Returns the name of the index.
 boolean isUnique()
          Determines whether this index is unique or not.
 void removeColumn(IndexColumn column)
          Removes the given index column from this index.
 void removeColumn(int idx)
          Removes the column at the specified position in this index.
 void setName(String name)
          Sets the name of the index.
 String toVerboseString()
          Returns a verbose string representation of this index.
 

Method Detail

isUnique

public boolean isUnique()
Determines whether this index is unique or not.

Returns:
true if the index is an unique one

getName

public String getName()
Returns the name of the index.

Returns:
The name

setName

public void setName(String name)
Sets the name of the index.

Parameters:
name - The name

getColumnCount

public int getColumnCount()
Returns the number of columns that make up this index.

Returns:
The number of index columns

getColumn

public IndexColumn getColumn(int idx)
Returns the indicated column making up this index.

Parameters:
idx - The index of the column
Returns:
The column

getColumns

public IndexColumn[] getColumns()
Returns the columns that make up this index.

Returns:
The columns

addColumn

public void addColumn(IndexColumn column)
Adds a column that makes up this index.

Parameters:
column - The column to add

removeColumn

public void removeColumn(IndexColumn column)
Removes the given index column from this index.

Parameters:
column - The column to remove

removeColumn

public void removeColumn(int idx)
Removes the column at the specified position in this index.

Parameters:
idx - The position of the index column to remove

toVerboseString

public String toVerboseString()
Returns a verbose string representation of this index.

Returns:
The string representation


Copyright © 2005 Apache Software Foundation. All Rights Reserved.