2004.04.29


com.jdc.rdb.sql.ddl.drop
Class Impact

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.SQLClause
              |
              +--com.jdc.rdb.sql.ddl.DDLClause
                    |
                    +--com.jdc.rdb.sql.ddl.drop.Impact
All Implemented Interfaces:
Clause, DropClause, Serializable

public class Impact
extends DDLClause
implements DropClause

Impact represents a Drop SQL statement impact clause. The impact clause specifies the impact of dropping a Table on other Database objects. Valid options are:

Reference:
IBM® DB2 Universal Database™ SQL Reference Volume 2 Version 8, Page 512.

Version:
2.0
Author:
Jay Damon
See Also:
Drop, Serialized Form

Field Summary
static String CASCADE
          Dropping a database object causes objects that depend upon it to be dropped as well.
static String RESTRICT
          The database object is not dropped if a one or more dependent objects exist.
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Impact()
          Constructs a new Impact clause object.
Impact(String option)
          Constructs a new Impact clause object for the specified impact option.
 
Method Summary
 String getValue()
          Returns the Impact clause value.
 Impact setCascade()
          Sets the Impact clause to drop all database objects that depend upon the object to be dropped
 Impact setRestrict()
          Sets the Impact clause to not drop the database object if one or more dependent objects exist.
 String toString()
          Returns a String representation of this Impact clause.
 
Methods inherited from class com.jdc.rdb.sql.ddl.DDLClause
getKeyword
 
Methods inherited from class com.jdc.rdb.sql.SQLClause
contains, getKeyword, setKeyword, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CASCADE

public static final String CASCADE
Dropping a database object causes objects that depend upon it to be dropped as well.

See Also:
Constant Field Values

RESTRICT

public static final String RESTRICT
The database object is not dropped if a one or more dependent objects exist.

See Also:
Constant Field Values
Constructor Detail

Impact

public Impact()
Constructs a new Impact clause object.


Impact

public Impact(String option)
Constructs a new Impact clause object for the specified impact option. Valid options are CASCADE or RESTRICT.

Throws:
SQLInvalidException - An invalid impact option is specified.
See Also:
setCascade(), setRestrict()
Method Detail

getValue

public String getValue()
Returns the Impact clause value.

Overrides:
getValue in class SQLClause
Returns:
The Impact clause value.

setCascade

public Impact setCascade()
Sets the Impact clause to drop all database objects that depend upon the object to be dropped

Returns:
This Impact clause object.
See Also:
setRestrict

setRestrict

public Impact setRestrict()
Sets the Impact clause to not drop the database object if one or more dependent objects exist.

Returns:
This Impact clause object.
See Also:
setCascade

toString

public String toString()
Returns a String representation of this Impact clause.

Specified by:
toString in interface DropClause
Overrides:
toString in class SQLClause
Returns:
A String representation of this Impact clause.

2004.04.29



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