ca.spaz.sql
Class SQLStatement

java.lang.Object
  extended by ca.spaz.sql.SQLStatement
Direct Known Subclasses:
SQLInsert, SQLSelectableStatement

public abstract class SQLStatement
extends java.lang.Object

Base class for SQL command generators

Author:
davidson

Field Summary
protected  java.lang.String table
           
 
Constructor Summary
protected SQLStatement(java.lang.String table, boolean querySupport, boolean executeSupport)
           
 
Method Summary
protected  void doExecute(java.sql.Connection con)
           
protected  java.sql.ResultSet doExecuteQuery(java.sql.Connection con)
           
 void execute(java.sql.Connection con)
           
 java.sql.ResultSet executeQuery(java.sql.Connection con)
           
protected abstract  java.lang.String getQueryString()
           
 java.lang.String getTableName()
           
 boolean isExecuteSupported()
           
 boolean isQuerySupported()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

protected java.lang.String table
Constructor Detail

SQLStatement

protected SQLStatement(java.lang.String table,
                       boolean querySupport,
                       boolean executeSupport)
Method Detail

execute

public final void execute(java.sql.Connection con)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

doExecute

protected void doExecute(java.sql.Connection con)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

isExecuteSupported

public final boolean isExecuteSupported()

executeQuery

public final java.sql.ResultSet executeQuery(java.sql.Connection con)
                                      throws java.sql.SQLException
Throws:
java.sql.SQLException

doExecuteQuery

protected java.sql.ResultSet doExecuteQuery(java.sql.Connection con)
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

isQuerySupported

public final boolean isQuerySupported()

getTableName

public java.lang.String getTableName()

getQueryString

protected abstract java.lang.String getQueryString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 Spaz. All Rights Reserved.