net.sf.farrago.jdbc.engine
Class FarragoJdbcEnginePreparedNonDdl

java.lang.Object
  extended by org.eigenbase.jdbc4.Unwrappable
      extended by net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement
          extended by net.sf.farrago.jdbc.engine.FarragoJdbcEnginePreparedStatement
              extended by net.sf.farrago.jdbc.engine.FarragoJdbcEnginePreparedNonDdl
All Implemented Interfaces:
PreparedStatement, Statement, FarragoStatement

public class FarragoJdbcEnginePreparedNonDdl
extends FarragoJdbcEnginePreparedStatement

FarragoJdbcEnginePreparedNonDdl implements FarragoJdbcEnginePreparedStatement when the statement is a query or DML.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/jdbc/engine/FarragoJdbcEnginePreparedNonDdl.java#17 $
Author:
John V. Sichi

Field Summary
 
Fields inherited from class net.sf.farrago.jdbc.engine.FarragoJdbcEnginePreparedStatement
ERRMSG_ALREADY_PREPARED, sql
 
Fields inherited from class net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement
connection, stmtContext
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Fields inherited from interface net.sf.farrago.jdbc.FarragoStatement
ERRMSG_IS_A_QUERY, ERRMSG_NOT_A_QUERY, ERRMSG_REQ_NON_NEG
 
Constructor Summary
FarragoJdbcEnginePreparedNonDdl(FarragoJdbcEngineConnection connection, FarragoSessionStmtContext stmtContext, String sql)
          Creates a new FarragoJdbcEnginePreparedNonDdl object.
 
Method Summary
 void clearParameters()
           
 boolean execute()
           
 ResultSet executeQuery()
           
 int executeUpdate()
           
 ResultSetMetaData getMetaData()
           
 ParameterMetaData getParameterMetaData()
           
 void setBigDecimal(int parameterIndex, BigDecimal x)
           
 void setBoolean(int parameterIndex, boolean x)
           
 void setByte(int parameterIndex, byte x)
           
 void setBytes(int parameterIndex, byte[] x)
           
 void setDate(int parameterIndex, Date x)
           
 void setDate(int parameterIndex, Date x, Calendar cal)
           
 void setDouble(int parameterIndex, double x)
           
private  void setDynamicParam(int parameterIndex, Object obj)
           
private  void setDynamicParam(int parameterIndex, Object obj, Calendar cal)
           
 void setFloat(int parameterIndex, float x)
           
 void setInt(int parameterIndex, int x)
           
 void setLong(int parameterIndex, long x)
           
 void setNull(int parameterIndex, int sqlType)
           
 void setObject(int parameterIndex, Object x)
           
 void setShort(int parameterIndex, short x)
           
 void setString(int parameterIndex, String x)
           
 void setTime(int parameterIndex, Time x)
           
 void setTime(int parameterIndex, Time x, Calendar cal)
           
 void setTimestamp(int parameterIndex, Timestamp x)
           
 void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
           
 
Methods inherited from class net.sf.farrago.jdbc.engine.FarragoJdbcEnginePreparedStatement
addBatch, addBatch, clearBatch, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setEscapeProcessing, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setObject, setObject, setRef, setRowId, setSQLXML, setUnicodeStream, setURL
 
Methods inherited from class net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement
cancel, clearWarnings, close, getConnection, getFarragoExecutingStmtId, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, openCursorResultSet, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, validateSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
cancel, clearWarnings, close, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Constructor Detail

FarragoJdbcEnginePreparedNonDdl

FarragoJdbcEnginePreparedNonDdl(FarragoJdbcEngineConnection connection,
                                FarragoSessionStmtContext stmtContext,
                                String sql)
Creates a new FarragoJdbcEnginePreparedNonDdl object.

Parameters:
connection - the connection creating this statement
stmtContext - the underyling prepared FarragoSessionStmtContext
sql - the text of the SQL statement
Method Detail

execute

public boolean execute()
                throws SQLException
Throws:
SQLException

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Throws:
SQLException

executeUpdate

public int executeUpdate()
                  throws SQLException
Throws:
SQLException

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
Specified by:
getMetaData in interface PreparedStatement
Overrides:
getMetaData in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

getParameterMetaData

public ParameterMetaData getParameterMetaData()
                                       throws SQLException
Specified by:
getParameterMetaData in interface PreparedStatement
Overrides:
getParameterMetaData in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

clearParameters

public void clearParameters()
                     throws SQLException
Specified by:
clearParameters in interface PreparedStatement
Overrides:
clearParameters in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setDynamicParam

private void setDynamicParam(int parameterIndex,
                             Object obj)
                      throws SQLException
Throws:
SQLException

setDynamicParam

private void setDynamicParam(int parameterIndex,
                             Object obj,
                             Calendar cal)
                      throws SQLException
Throws:
SQLException

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws SQLException
Specified by:
setNull in interface PreparedStatement
Overrides:
setNull in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws SQLException
Specified by:
setBoolean in interface PreparedStatement
Overrides:
setBoolean in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws SQLException
Specified by:
setByte in interface PreparedStatement
Overrides:
setByte in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setShort

public void setShort(int parameterIndex,
                     short x)
              throws SQLException
Specified by:
setShort in interface PreparedStatement
Overrides:
setShort in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setInt

public void setInt(int parameterIndex,
                   int x)
            throws SQLException
Specified by:
setInt in interface PreparedStatement
Overrides:
setInt in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setLong

public void setLong(int parameterIndex,
                    long x)
             throws SQLException
Specified by:
setLong in interface PreparedStatement
Overrides:
setLong in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws SQLException
Specified by:
setFloat in interface PreparedStatement
Overrides:
setFloat in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws SQLException
Specified by:
setDouble in interface PreparedStatement
Overrides:
setDouble in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          BigDecimal x)
                   throws SQLException
Specified by:
setBigDecimal in interface PreparedStatement
Overrides:
setBigDecimal in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setString

public void setString(int parameterIndex,
                      String x)
               throws SQLException
Specified by:
setString in interface PreparedStatement
Overrides:
setString in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws SQLException
Specified by:
setBytes in interface PreparedStatement
Overrides:
setBytes in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setDate

public void setDate(int parameterIndex,
                    Date x)
             throws SQLException
Specified by:
setDate in interface PreparedStatement
Overrides:
setDate in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setDate

public void setDate(int parameterIndex,
                    Date x,
                    Calendar cal)
             throws SQLException
Specified by:
setDate in interface PreparedStatement
Overrides:
setDate in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setTime

public void setTime(int parameterIndex,
                    Time x)
             throws SQLException
Specified by:
setTime in interface PreparedStatement
Overrides:
setTime in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setTime

public void setTime(int parameterIndex,
                    Time x,
                    Calendar cal)
             throws SQLException
Specified by:
setTime in interface PreparedStatement
Overrides:
setTime in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(int parameterIndex,
                         Timestamp x)
                  throws SQLException
Specified by:
setTimestamp in interface PreparedStatement
Overrides:
setTimestamp in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(int parameterIndex,
                         Timestamp x,
                         Calendar cal)
                  throws SQLException
Specified by:
setTimestamp in interface PreparedStatement
Overrides:
setTimestamp in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException

setObject

public void setObject(int parameterIndex,
                      Object x)
               throws SQLException
Specified by:
setObject in interface PreparedStatement
Overrides:
setObject in class FarragoJdbcEnginePreparedStatement
Throws:
SQLException