org.apache.ddlutils.model
Class IndexColumn

java.lang.Object
  extended by org.apache.ddlutils.model.IndexColumn
All Implemented Interfaces:
Serializable, Cloneable

public class IndexColumn
extends Object
implements Cloneable, Serializable

Represents a column of an index in the database model.

Version:
$Revision: 504014 $
See Also:
Serialized Form

Field Summary
protected  String _name
          The name of the column.
protected  String _size
          The size of the column in the index.
 
Constructor Summary
IndexColumn()
          Creates a new index column object.
IndexColumn(Column column)
          Creates a new index column object.
IndexColumn(String columnName)
          Creates a new index column object.
 
Method Summary
 Object clone()
          
 boolean equals(Object obj)
          
 boolean equalsIgnoreCase(IndexColumn other)
          Compares this index column to the given one while ignoring the case of identifiers.
 Column getColumn()
          Returns the indexed column.
 String getName()
          Returns the name of the column.
 int getOrdinalPosition()
          Returns the position within the owning index.
 String getSize()
          Returns the size of the column in the index.
 int hashCode()
          
 void setColumn(Column column)
          Sets the indexed column.
 void setName(String name)
          Sets the name of the column.
 void setOrdinalPosition(int position)
          Sets the position within the owning index.
 void setSize(String size)
          Sets the size of the column in the index.
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_name

protected String _name
The name of the column.


_size

protected String _size
The size of the column in the index.

Constructor Detail

IndexColumn

public IndexColumn()
Creates a new index column object.


IndexColumn

public IndexColumn(Column column)
Creates a new index column object.

Parameters:
column - The indexed column

IndexColumn

public IndexColumn(String columnName)
Creates a new index column object.

Parameters:
columnName - The name of the corresponding table column
Method Detail

getOrdinalPosition

public int getOrdinalPosition()
Returns the position within the owning index.

Returns:
The position

setOrdinalPosition

public void setOrdinalPosition(int position)
Sets the position within the owning index. Please note that you should not change the value once the column has been added to a index.

Parameters:
position - The position

getName

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

Returns:
The name

setName

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

Parameters:
name - The name

getColumn

public Column getColumn()
Returns the indexed column.

Returns:
The column

setColumn

public void setColumn(Column column)
Sets the indexed column.

Parameters:
column - The column

getSize

public String getSize()
Returns the size of the column in the index.

Returns:
The size

setSize

public void setSize(String size)
Sets the size of the column in the index.

Parameters:
size - The size

clone

public Object clone()
             throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

equalsIgnoreCase

public boolean equalsIgnoreCase(IndexColumn other)
Compares this index column to the given one while ignoring the case of identifiers.

Parameters:
other - The other index column
Returns:
true if this index column is equal (ignoring case) to the given one

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.