2004.04.29


com.jdc.rdb.sql.dml.clause
Class From

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.SQLClause
              |
              +--com.jdc.rdb.sql.dml.DMLClause
                    |
                    +--com.jdc.rdb.sql.dml.clause.From
All Implemented Interfaces:
Clause, DeleteClause, SelectClause, Serializable

public class From
extends DMLClause
implements SelectClause, DeleteClause

From represents a Select or Delete SQL statement FROM clause. The FROM clause identifies the object of a Select or Delete operation. The name must identify a Table or a View.

For a Delete statement, the name must not identify a read-only view.

References:
IBM® DB2 Universal Database™ SQL Reference Volume 1 Version 8, Pages 560 thru 563.
IBM® DB2 Universal Database™ SQL Reference Volume 2 Version 8, Pages 498 thru 499.

Version:
2.0
Author:
Jay Damon
See Also:
Select, Delete, Serialized Form

Field Summary
 
Fields inherited from class com.jdc.rdb.sql.dml.DMLClause
sqlClause
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
From()
          Constructs a new From clause object.
From(String name)
          Constructs a new From clause object for the specified Database Table or View name.
 
Method Summary
 String getKeyword()
          Returns the From clause keyword.
 String getValue()
          Returns the From clause value.
 From setName(String name)
          Sets the database Table or View name to Select or Delete a row from.
 From setOnly()
          Specifies that SQL the statement should apply only to data of the specified Table or View.
 String toString()
          Returns a String representation of this From clause.
 
Methods inherited from class com.jdc.rdb.sql.dml.DMLClause
getKeyword
 
Methods inherited from class com.jdc.rdb.sql.SQLClause
contains, setKeyword, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

From

public From()
Constructs a new From clause object.


From

public From(String name)
Constructs a new From clause object for the specified Database Table or View name.

Throws:
SQLInvalidException - No FROM clause table or view name is specified.
See Also:
setName(String)
Method Detail

getKeyword

public String getKeyword()
Returns the From clause keyword.

Overrides:
getKeyword in class SQLClause
Returns:
The From clause keyword.

getValue

public String getValue()
Returns the From clause value.

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

setName

public From setName(String name)
Sets the database Table or View name to Select or Delete a row from.

Returns:
This From clause object.
Throws:
SQLInvalidException - No table or view name is specified.

setOnly

public From setOnly()
Specifies that SQL the statement should apply only to data of the specified Table or View. Rows of proper subtables will not be deleted by the statement.

Note:
This method is applicable to Delete statements only.

Returns:
This From clause object.

toString

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

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

2004.04.29



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