SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

com.solarmetric.kodo.impl.jdbc.sql
Class SQLStatement

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.sql.SQLStatement
Direct Known Subclasses:
NonSelectingSQL, Select

public abstract class SQLStatement
extends Object

Base abstraction of any SQL statement.


Constructor Summary
SQLStatement(DBDictionary dict, ClassResolver resolver)
           
SQLStatement(SQLStatement copy, ClassResolver resolver)
           
 
Method Summary
 SQLStatement and(SQLStatement same)
          AND the previous WHERE clause with the given one.
 void clear()
          Clear the WHERE clause and table list so that this statement can be reused.
 void clearTable()
          Clear the tables clause.
 void clearWhere()
          Clear the WHERE clause.
 ClassResolver getClassResolver()
           
 DBDictionary getDictionary()
          Return the DBDictionary in use.
abstract  SQLBuffer getSQLBuffer()
          Return the SQLBuffer to be used for exeucting the statement;
 String[] getTables()
          Return a list of tables used in this statement
 SQLBuffer getWhere()
          Return the WHERE portion of the SQL statement.
 boolean isValid()
          Return true if at least one table has been set for this SQL statement.
 SQLStatement not()
          NOT the previous WHERE clause.
 SQLStatement or(SQLStatement same)
          OR the previous WHERE clause with the given one.
 String toString()
           
 SQLStatement where(Column[] col, Object[] value)
          Set the criteria to inclde that the the given columns must equal the given values; this also adds the tables of the given columns to the tables clause of this statement.
 SQLStatement where(Column col, boolean value)
          See where(Column,Object).
 SQLStatement where(Column col, char value)
          See where(Column,Object).
 SQLStatement where(Column col, double value)
          See where(Column,Object).
 SQLStatement where(Column col, float value)
          See where(Column,Object).
 SQLStatement where(Column col, int value)
          See where(Column,Object).
 SQLStatement where(Column col, long value)
          See where(Column,Object).
 SQLStatement where(Column col, Object value)
          Set the criteria to inclde that the the given column must equal the given value; this also adds the table of the given column to the tables clause of this statement.
 SQLStatement where(Column col, short value)
          See where(Column,Object).
 SQLStatement where(SQLBuffer clause)
          Set the given clause to the WHERE part of this statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLStatement

public SQLStatement(DBDictionary dict,
                    ClassResolver resolver)

SQLStatement

public SQLStatement(SQLStatement copy,
                    ClassResolver resolver)
Method Detail

getDictionary

public DBDictionary getDictionary()
Return the DBDictionary in use.

getClassResolver

public ClassResolver getClassResolver()

getTables

public String[] getTables()
Return a list of tables used in this statement

clearTable

public void clearTable()
Clear the tables clause.

where

public SQLStatement where(SQLBuffer clause)
Set the given clause to the WHERE part of this statement.

where

public SQLStatement where(Column col,
                          Object value)
Set the criteria to inclde that the the given column must equal the given value; this also adds the table of the given column to the tables clause of this statement.

where

public SQLStatement where(Column col,
                          boolean value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          char value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          double value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          float value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          int value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          long value)
See where(Column,Object).

where

public SQLStatement where(Column col,
                          short value)
See where(Column,Object).

where

public SQLStatement where(Column[] col,
                          Object[] value)
Set the criteria to inclde that the the given columns must equal the given values; this also adds the tables of the given columns to the tables clause of this statement.

getWhere

public SQLBuffer getWhere()
Return the WHERE portion of the SQL statement.

clearWhere

public void clearWhere()
Clear the WHERE clause.

and

public SQLStatement and(SQLStatement same)
AND the previous WHERE clause with the given one. Example: sql.where (foo).and (sql.where (bar));.

or

public SQLStatement or(SQLStatement same)
OR the previous WHERE clause with the given one. Example: sql.where (foo).or (sql.where (bar));.

not

public SQLStatement not()
NOT the previous WHERE clause. Example: sql.where (foo).not ();.

toString

public final String toString()
Overrides:
toString in class Object

isValid

public boolean isValid()
Return true if at least one table has been set for this SQL statement.

clear

public void clear()
Clear the WHERE clause and table list so that this statement can be reused.

getSQLBuffer

public abstract SQLBuffer getSQLBuffer()
Return the SQLBuffer to be used for exeucting the statement;

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.