org.javasimon.jdbc
Class SimonCallableStatement

java.lang.Object
  extended by org.javasimon.jdbc.SimonStatement
      extended by org.javasimon.jdbc.SimonPreparedStatement
          extended by org.javasimon.jdbc.SimonCallableStatement
All Implemented Interfaces:
CallableStatement, PreparedStatement, Statement, Wrapper

public final class SimonCallableStatement
extends SimonPreparedStatement
implements CallableStatement

Simon JDBC proxy callable statement implemntation class.

Since:
1.0
Version:
$Revision: 304 $ $Date: 2011-04-08 10:39:02 +0200 (Fri, 08 Apr 2011) $
Author:
Radovan Sninsky

Field Summary
private  CallableStatement stmt
           
 
Fields inherited from class org.javasimon.jdbc.SimonPreparedStatement
sql
 
Fields inherited from class org.javasimon.jdbc.SimonStatement
batchSql, conn, prefix, split, sqlCmdLabel, sqlNormalizer
 
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
 
Constructor Summary
SimonCallableStatement(Connection conn, CallableStatement stmt, String sql, String prefix)
          Class constructor, initializes Simons (lifespan, active) related to statement.
 
Method Summary
 Array getArray(int i)
          
 Array getArray(String s)
          
 BigDecimal getBigDecimal(int i)
          
 BigDecimal getBigDecimal(int i, int i1)
          Deprecated. 
 BigDecimal getBigDecimal(String s)
          
 Blob getBlob(int i)
          
 Blob getBlob(String s)
          
 boolean getBoolean(int i)
          
 boolean getBoolean(String s)
          
 byte getByte(int i)
          
 byte getByte(String s)
          
 byte[] getBytes(int i)
          
 byte[] getBytes(String s)
          
 Clob getClob(int i)
          
 Clob getClob(String s)
          
 Date getDate(int i)
          
 Date getDate(int i, Calendar calendar)
          
 Date getDate(String s)
          
 Date getDate(String s, Calendar calendar)
          
 double getDouble(int i)
          
 double getDouble(String s)
          
 float getFloat(int i)
          
 float getFloat(String s)
          
 int getInt(int i)
          
 int getInt(String s)
          
 long getLong(int i)
          
 long getLong(String s)
          
 Object getObject(int i)
          
 Object getObject(int i, Map<String,Class<?>> stringClassMap)
          
 Object getObject(String s)
          
 Object getObject(String s, Map<String,Class<?>> stringClassMap)
          
 Ref getRef(int i)
          
 Ref getRef(String s)
          
 short getShort(int i)
          
 short getShort(String s)
          
 String getString(int i)
          
 String getString(String s)
          
 Time getTime(int i)
          
 Time getTime(int i, Calendar calendar)
          
 Time getTime(String s)
          
 Time getTime(String s, Calendar calendar)
          
 Timestamp getTimestamp(int i)
          
 Timestamp getTimestamp(int i, Calendar calendar)
          
 Timestamp getTimestamp(String s)
          
 Timestamp getTimestamp(String s, Calendar calendar)
          
 URL getURL(int i)
          
 URL getURL(String s)
          
 void registerOutParameter(int i, int i1)
          
 void registerOutParameter(int i, int i1, int i2)
          
 void registerOutParameter(int i, int i1, String s)
          
 void registerOutParameter(String s, int i)
          
 void registerOutParameter(String s, int i, int i1)
          
 void registerOutParameter(String s, int i, String s1)
          
 void setAsciiStream(String s, InputStream inputStream, int i)
          
 void setBigDecimal(String s, BigDecimal bigDecimal)
          
 void setBinaryStream(String s, InputStream inputStream, int i)
          
 void setBoolean(String s, boolean b)
          
 void setByte(String s, byte b)
          
 void setBytes(String s, byte[] bytes)
          
 void setCharacterStream(String s, Reader reader, int i)
          
 void setDate(String s, Date date)
          
 void setDate(String s, Date date, Calendar calendar)
          
 void setDouble(String s, double v)
          
 void setFloat(String s, float v)
          
 void setInt(String s, int i)
          
 void setLong(String s, long l)
          
 void setNull(String s, int i)
          
 void setNull(String s, int i, String s1)
          
 void setObject(String s, Object o)
          
 void setObject(String s, Object o, int i)
          
 void setObject(String s, Object o, int i, int i1)
          
 void setShort(String s, short i)
          
 void setString(String s, String s1)
          
 void setTime(String s, Time time)
          
 void setTime(String s, Time time, Calendar calendar)
          
 void setTimestamp(String s, Timestamp timestamp)
          
 void setTimestamp(String s, Timestamp timestamp, Calendar calendar)
          
 void setURL(String s, URL url)
          
 boolean wasNull()
          
 
Methods inherited from class org.javasimon.jdbc.SimonPreparedStatement
addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, prepare, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
Methods inherited from class org.javasimon.jdbc.SimonStatement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finish, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, prepare, prepare, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, startSplit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.CallableStatement
getCharacterStream, getCharacterStream, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML
 
Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

stmt

private CallableStatement stmt
Constructor Detail

SimonCallableStatement

SimonCallableStatement(Connection conn,
                       CallableStatement stmt,
                       String sql,
                       String prefix)
Class constructor, initializes Simons (lifespan, active) related to statement.

Parameters:
conn - database connection (Simon impl.)
stmt - real callable statement
sql - sql command
prefix - hierarchy prefix for statement Simons
Method Detail

registerOutParameter

public void registerOutParameter(int i,
                                 int i1)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

registerOutParameter

public void registerOutParameter(int i,
                                 int i1,
                                 int i2)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

wasNull

public boolean wasNull()
                throws SQLException

Specified by:
wasNull in interface CallableStatement
Throws:
SQLException

getString

public String getString(int i)
                 throws SQLException

Specified by:
getString in interface CallableStatement
Throws:
SQLException

getBoolean

public boolean getBoolean(int i)
                   throws SQLException

Specified by:
getBoolean in interface CallableStatement
Throws:
SQLException

getByte

public byte getByte(int i)
             throws SQLException

Specified by:
getByte in interface CallableStatement
Throws:
SQLException

getShort

public short getShort(int i)
               throws SQLException

Specified by:
getShort in interface CallableStatement
Throws:
SQLException

getInt

public int getInt(int i)
           throws SQLException

Specified by:
getInt in interface CallableStatement
Throws:
SQLException

getLong

public long getLong(int i)
             throws SQLException

Specified by:
getLong in interface CallableStatement
Throws:
SQLException

getFloat

public float getFloat(int i)
               throws SQLException

Specified by:
getFloat in interface CallableStatement
Throws:
SQLException

getDouble

public double getDouble(int i)
                 throws SQLException

Specified by:
getDouble in interface CallableStatement
Throws:
SQLException

getBigDecimal

@Deprecated
public BigDecimal getBigDecimal(int i,
                                           int i1)
                         throws SQLException
Deprecated. 

Specified by:
getBigDecimal in interface CallableStatement
Throws:
SQLException

getBytes

public byte[] getBytes(int i)
                throws SQLException

Specified by:
getBytes in interface CallableStatement
Throws:
SQLException

getDate

public Date getDate(int i)
             throws SQLException

Specified by:
getDate in interface CallableStatement
Throws:
SQLException

getTime

public Time getTime(int i)
             throws SQLException

Specified by:
getTime in interface CallableStatement
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(int i)
                       throws SQLException

Specified by:
getTimestamp in interface CallableStatement
Throws:
SQLException

getObject

public Object getObject(int i)
                 throws SQLException

Specified by:
getObject in interface CallableStatement
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(int i)
                         throws SQLException

Specified by:
getBigDecimal in interface CallableStatement
Throws:
SQLException

getObject

public Object getObject(int i,
                        Map<String,Class<?>> stringClassMap)
                 throws SQLException

Specified by:
getObject in interface CallableStatement
Throws:
SQLException

getRef

public Ref getRef(int i)
           throws SQLException

Specified by:
getRef in interface CallableStatement
Throws:
SQLException

getBlob

public Blob getBlob(int i)
             throws SQLException

Specified by:
getBlob in interface CallableStatement
Throws:
SQLException

getClob

public Clob getClob(int i)
             throws SQLException

Specified by:
getClob in interface CallableStatement
Throws:
SQLException

getArray

public Array getArray(int i)
               throws SQLException

Specified by:
getArray in interface CallableStatement
Throws:
SQLException

getDate

public Date getDate(int i,
                    Calendar calendar)
             throws SQLException

Specified by:
getDate in interface CallableStatement
Throws:
SQLException

getTime

public Time getTime(int i,
                    Calendar calendar)
             throws SQLException

Specified by:
getTime in interface CallableStatement
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(int i,
                              Calendar calendar)
                       throws SQLException

Specified by:
getTimestamp in interface CallableStatement
Throws:
SQLException

registerOutParameter

public void registerOutParameter(int i,
                                 int i1,
                                 String s)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

registerOutParameter

public void registerOutParameter(String s,
                                 int i)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

registerOutParameter

public void registerOutParameter(String s,
                                 int i,
                                 int i1)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

registerOutParameter

public void registerOutParameter(String s,
                                 int i,
                                 String s1)
                          throws SQLException

Specified by:
registerOutParameter in interface CallableStatement
Throws:
SQLException

getURL

public URL getURL(int i)
           throws SQLException

Specified by:
getURL in interface CallableStatement
Throws:
SQLException

setURL

public void setURL(String s,
                   URL url)
            throws SQLException

Specified by:
setURL in interface CallableStatement
Throws:
SQLException

setNull

public void setNull(String s,
                    int i)
             throws SQLException

Specified by:
setNull in interface CallableStatement
Throws:
SQLException

setBoolean

public void setBoolean(String s,
                       boolean b)
                throws SQLException

Specified by:
setBoolean in interface CallableStatement
Throws:
SQLException

setByte

public void setByte(String s,
                    byte b)
             throws SQLException

Specified by:
setByte in interface CallableStatement
Throws:
SQLException

setShort

public void setShort(String s,
                     short i)
              throws SQLException

Specified by:
setShort in interface CallableStatement
Throws:
SQLException

setInt

public void setInt(String s,
                   int i)
            throws SQLException

Specified by:
setInt in interface CallableStatement
Throws:
SQLException

setLong

public void setLong(String s,
                    long l)
             throws SQLException

Specified by:
setLong in interface CallableStatement
Throws:
SQLException

setFloat

public void setFloat(String s,
                     float v)
              throws SQLException

Specified by:
setFloat in interface CallableStatement
Throws:
SQLException

setDouble

public void setDouble(String s,
                      double v)
               throws SQLException

Specified by:
setDouble in interface CallableStatement
Throws:
SQLException

setBigDecimal

public void setBigDecimal(String s,
                          BigDecimal bigDecimal)
                   throws SQLException

Specified by:
setBigDecimal in interface CallableStatement
Throws:
SQLException

setString

public void setString(String s,
                      String s1)
               throws SQLException

Specified by:
setString in interface CallableStatement
Throws:
SQLException

setBytes

public void setBytes(String s,
                     byte[] bytes)
              throws SQLException

Specified by:
setBytes in interface CallableStatement
Throws:
SQLException

setDate

public void setDate(String s,
                    Date date)
             throws SQLException

Specified by:
setDate in interface CallableStatement
Throws:
SQLException

setTime

public void setTime(String s,
                    Time time)
             throws SQLException

Specified by:
setTime in interface CallableStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(String s,
                         Timestamp timestamp)
                  throws SQLException

Specified by:
setTimestamp in interface CallableStatement
Throws:
SQLException

setAsciiStream

public void setAsciiStream(String s,
                           InputStream inputStream,
                           int i)
                    throws SQLException

Specified by:
setAsciiStream in interface CallableStatement
Throws:
SQLException

setBinaryStream

public void setBinaryStream(String s,
                            InputStream inputStream,
                            int i)
                     throws SQLException

Specified by:
setBinaryStream in interface CallableStatement
Throws:
SQLException

setObject

public void setObject(String s,
                      Object o,
                      int i,
                      int i1)
               throws SQLException

Specified by:
setObject in interface CallableStatement
Throws:
SQLException

setObject

public void setObject(String s,
                      Object o,
                      int i)
               throws SQLException

Specified by:
setObject in interface CallableStatement
Throws:
SQLException

setObject

public void setObject(String s,
                      Object o)
               throws SQLException

Specified by:
setObject in interface CallableStatement
Throws:
SQLException

setCharacterStream

public void setCharacterStream(String s,
                               Reader reader,
                               int i)
                        throws SQLException

Specified by:
setCharacterStream in interface CallableStatement
Throws:
SQLException

setDate

public void setDate(String s,
                    Date date,
                    Calendar calendar)
             throws SQLException

Specified by:
setDate in interface CallableStatement
Throws:
SQLException

setTime

public void setTime(String s,
                    Time time,
                    Calendar calendar)
             throws SQLException

Specified by:
setTime in interface CallableStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(String s,
                         Timestamp timestamp,
                         Calendar calendar)
                  throws SQLException

Specified by:
setTimestamp in interface CallableStatement
Throws:
SQLException

setNull

public void setNull(String s,
                    int i,
                    String s1)
             throws SQLException

Specified by:
setNull in interface CallableStatement
Throws:
SQLException

getString

public String getString(String s)
                 throws SQLException

Specified by:
getString in interface CallableStatement
Throws:
SQLException

getBoolean

public boolean getBoolean(String s)
                   throws SQLException

Specified by:
getBoolean in interface CallableStatement
Throws:
SQLException

getByte

public byte getByte(String s)
             throws SQLException

Specified by:
getByte in interface CallableStatement
Throws:
SQLException

getShort

public short getShort(String s)
               throws SQLException

Specified by:
getShort in interface CallableStatement
Throws:
SQLException

getInt

public int getInt(String s)
           throws SQLException

Specified by:
getInt in interface CallableStatement
Throws:
SQLException

getLong

public long getLong(String s)
             throws SQLException

Specified by:
getLong in interface CallableStatement
Throws:
SQLException

getFloat

public float getFloat(String s)
               throws SQLException

Specified by:
getFloat in interface CallableStatement
Throws:
SQLException

getDouble

public double getDouble(String s)
                 throws SQLException

Specified by:
getDouble in interface CallableStatement
Throws:
SQLException

getBytes

public byte[] getBytes(String s)
                throws SQLException

Specified by:
getBytes in interface CallableStatement
Throws:
SQLException

getDate

public Date getDate(String s)
             throws SQLException

Specified by:
getDate in interface CallableStatement
Throws:
SQLException

getTime

public Time getTime(String s)
             throws SQLException

Specified by:
getTime in interface CallableStatement
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(String s)
                       throws SQLException

Specified by:
getTimestamp in interface CallableStatement
Throws:
SQLException

getObject

public Object getObject(String s)
                 throws SQLException

Specified by:
getObject in interface CallableStatement
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(String s)
                         throws SQLException

Specified by:
getBigDecimal in interface CallableStatement
Throws:
SQLException

getObject

public Object getObject(String s,
                        Map<String,Class<?>> stringClassMap)
                 throws SQLException

Specified by:
getObject in interface CallableStatement
Throws:
SQLException

getRef

public Ref getRef(String s)
           throws SQLException

Specified by:
getRef in interface CallableStatement
Throws:
SQLException

getBlob

public Blob getBlob(String s)
             throws SQLException

Specified by:
getBlob in interface CallableStatement
Throws:
SQLException

getClob

public Clob getClob(String s)
             throws SQLException

Specified by:
getClob in interface CallableStatement
Throws:
SQLException

getArray

public Array getArray(String s)
               throws SQLException

Specified by:
getArray in interface CallableStatement
Throws:
SQLException

getDate

public Date getDate(String s,
                    Calendar calendar)
             throws SQLException

Specified by:
getDate in interface CallableStatement
Throws:
SQLException

getTime

public Time getTime(String s,
                    Calendar calendar)
             throws SQLException

Specified by:
getTime in interface CallableStatement
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(String s,
                              Calendar calendar)
                       throws SQLException

Specified by:
getTimestamp in interface CallableStatement
Throws:
SQLException

getURL

public URL getURL(String s)
           throws SQLException

Specified by:
getURL in interface CallableStatement
Throws:
SQLException


Copyright © 2011. All Rights Reserved.