Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.model
Class IndexImpBase

    java.lang.Object
      org.apache.ddlutils.model.IndexImpBase

All Implemented Interfaces:
  Serializable, Cloneable, Index

Direct Known Subclasses:
  NonUniqueIndex, UniqueIndex

    public abstract class IndexImpBase

extends Object
implements Index

Base class for indices.

Version:
  $Revision: $
See Also:
  Serialized Form

Field Summary
`protected ArrayList` | `_columns` The columns making up the index.
`protected String` | `_name` The name of the index.

Constructor Summary
`IndexImpBase()`

Method Summary
`void` | `addColumn(IndexColumn column)` Adds a column that makes up this index.
`abstract Object` | `clone()` Clones 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` | `hasColumn(Column column)` Determines whether this index includes the given column.
`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.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.ddlutils.model.Index
`equalsIgnoreCase, isUnique, toVerboseString`

Field Detail

### _name

    protected String _name

  The name of the index.

### _columns

    protected ArrayList _columns

  The columns making up the index.

Constructor Detail

### IndexImpBase

    public IndexImpBase()

Method Detail

### getName

    public String getName()

  Returns the name of the index.

  Specified by:
    `getName` in interface `Index`
  Returns:
    The name

### setName

    public void setName(String name)

  Sets the name of the index.

  Specified by:
    `setName` in interface `Index`
  Parameters:
    `name` - The name

### getColumnCount

    public int getColumnCount()

  Returns the number of columns that make up this index.

  Specified by:
    `getColumnCount` in interface `Index`
  Returns:
    The number of index columns

### getColumn

    public IndexColumn getColumn(int idx)

  Returns the indicated column making up this index.

  Specified by:
    `getColumn` in interface `Index`
  Parameters:
    `idx` - The index of the column
  Returns:
    The column

### getColumns

    public IndexColumn[] getColumns()

  Returns the columns that make up this index.

  Specified by:
    `getColumns` in interface `Index`
  Returns:
    The columns

### hasColumn

    public boolean hasColumn(Column column)

  Determines whether this index includes the given column.

  Specified by:
    `hasColumn` in interface `Index`
  Parameters:
    `column` - The column to check for
  Returns:
    `true` if the column is included in this index

### addColumn

    public void addColumn(IndexColumn column)

  Adds a column that makes up this index.

  Specified by:
    `addColumn` in interface `Index`
  Parameters:
    `column` - The column to add

### removeColumn

    public void removeColumn(IndexColumn column)

  Removes the given index column from this index.

  Specified by:
    `removeColumn` in interface `Index`
  Parameters:
    `column` - The column to remove

### removeColumn

    public void removeColumn(int idx)

  Removes the column at the specified position in this index.

  Specified by:
    `removeColumn` in interface `Index`
  Parameters:
    `idx` - The position of the index column to remove

### clone

    public abstract Object clone()
                          throws CloneNotSupportedException

  Clones this index.

  Specified by:
    `clone` in interface `Index`
  Overrides:
    `clone` in class `Object`
  Returns:
    The clone
  Throws:
    `CloneNotSupportedException` - If the cloning did fail

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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