2004.04.29


com.jdc.rdb.sql.ddl.alter
Class Alter

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.SQL
              |
              +--com.jdc.rdb.sql.ddl.DDL
                    |
                    +--com.jdc.rdb.sql.ddl.alter.Alter
All Implemented Interfaces:
Serializable, Statement

public class Alter
extends DDL

Alter represents a Data Definition Language ALTER SQL statement. The Alter statement alters an existing Database Table.

Version:
1.5
Author:
Jay Damon
See Also:
Table, Serialized Form

Field Summary
static String COMMAND
          The Alter statement command keyword.
 
Fields inherited from class com.jdc.rdb.sql.ddl.DDL
sql
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Alter()
          Constructs a new Alter statement object.
Alter(String statement)
          Constructs a new Alter statement object for the specified SQL String.
Alter(Table table)
          Constructs a new Alter statement object for the specified Database Table definition.
 
Method Summary
 AlterStatus execute()
          Executes the Alter statement and returns a AlterStatus object.
 Alter set(AlterClause clause)
          Sets a AlterClause for this Alter statement.
 
Methods inherited from class com.jdc.rdb.sql.ddl.DDL
finalize, getConnection, getDatabase, getObject, isValid, setObject
 
Methods inherited from class com.jdc.rdb.sql.SQL
addClause, execute, getClause, getCommand, getStatement, setCommand, setConnection, setStatement, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMMAND

public static final String COMMAND
The Alter statement command keyword.

See Also:
Constant Field Values
Constructor Detail

Alter

public Alter()
Constructs a new Alter statement object.


Alter

public Alter(Table table)
Constructs a new Alter statement object for the specified Database Table definition.

Throws:
SQLInvalidException - No table definition is specified.

Alter

public Alter(String statement)
Constructs a new Alter statement object for the specified SQL String. If you specify a custom SQL String, you must also specify a Database Connection to use.

Throws:
SQLInvalidException - No ALTER statement is specified.
See Also:
SQL.setConnection(java.sql.Connection)
Method Detail

execute

public AlterStatus execute()
Executes the Alter statement and returns a AlterStatus object.

Returns:
The Alter statement status.

set

public Alter set(AlterClause clause)
Sets a AlterClause for this Alter statement. Use this method to specify a custom Alter clause.

Returns:
This Alter statement object.
Throws:
SQLInvalidException - No ALTER statement clause is specified.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.