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.alteration
Class AddColumnChange

    java.lang.Object
      org.apache.ddlutils.alteration.TableChangeImplBase
          org.apache.ddlutils.alteration.AddColumnChange

All Implemented Interfaces:
  ModelChange, TableChange

    public class AddColumnChange

extends TableChangeImplBase

Represents the addition of a column to a table.

Version:
  $Revision: $

Constructor Summary
`AddColumnChange(Table table, Column newColumn, Column previousColumn, Column nextColumn)` Creates a new change object.

Method Summary
`void` | `apply(Database database, boolean caseSensitive)` Applies this change to the given database.
`Column` | `getNewColumn()` Returns the new column.
`Column` | `getNextColumn()` Returns the column before which the new column should be added.
`Column` | `getPreviousColumn()` Returns the column after which the new column should be added.
`boolean` | `isAtEnd()` Determines whether the column is added at the end (when applied in the order of creation of the changes).
`void` | `setAtEnd(boolean atEnd)` Specifies whether the column is added at the end (when applied in the order of creation of the changes).

Methods inherited from class org.apache.ddlutils.alteration.TableChangeImplBase
`getChangedTable`

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

Constructor Detail

### AddColumnChange

    public AddColumnChange(Table table,
                           Column newColumn,
                           Column previousColumn,
                           Column nextColumn)

  Creates a new change object.

  Parameters:
    `table` - The table to add the column to
    `newColumn` - The new column
    `previousColumn` - The column after which the new column should be added
    `nextColumn` - The column before which the new column should be added

Method Detail

### getNewColumn

    public Column getNewColumn()

  Returns the new column.

  Returns:
    The new column

### getPreviousColumn

    public Column getPreviousColumn()

  Returns the column after which the new column should be added.

  Returns:
    The previous column

### getNextColumn

    public Column getNextColumn()

  Returns the column before which the new column should be added.

  Returns:
    The next column

### isAtEnd

    public boolean isAtEnd()

  Determines whether the column is added at the end (when applied in the order of creation of the changes).

  Returns:
    `true` if the column is added at the end

### setAtEnd

    public void setAtEnd(boolean atEnd)

  Specifies whether the column is added at the end (when applied in the order of creation of the changes).

  Parameters:
    `atEnd` - `true` if the column is added at the end

### apply

    public void apply(Database database,
                      boolean caseSensitive)

  Applies this change to the given database.

  Parameters:
    `database` - The database
    `caseSensitive` - Whether the case of names matters

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.