| java.lang.Object net.sourceforge.jtds.jdbc.JtdsStatement net.sourceforge.jtds.jdbc.JtdsPreparedStatement net.sourceforge.jtds.jdbc.JtdsCallableStatement
JtdsCallableStatement | public class JtdsCallableStatement extends JtdsPreparedStatement implements CallableStatement(Code) | | jTDS implementation of the java.sql.CallableStatement interface.
Implementation note:
- This class is a simple subclass of PreparedStatement and mainly adds support for
setting parameters.
- The class supports named parameters in a similar way to the
patch supplied by Tommy Sandstrom to the original jTDS code.
author: Mike Hutchinson version: $Id: JtdsCallableStatement.java,v 1.23 2007/07/12 21:03:23 bheineman Exp $ |
Field Summary | |
protected boolean | paramWasNull Last parameter retrieved was null. |
Method Summary | |
protected void | checkOpen() Check that this statement is still open. | protected SQLException | executeMSBatch(int size, int executeSize, ArrayList counts) Execute the SQL batch on a MS server.
Parameters: size - the total size of the batch. Parameters: executeSize - the maximum number of statements to send in one request. Parameters: counts - the returned update counts. | protected SQLException | executeSybaseBatch(int size, int executeSize, ArrayList counts) Execute the SQL batch on a Sybase server.
For the rare case of CallableStatement batches each statement is executed individually. | int | findParameter(String name, boolean set) Find a parameter by name.
Parameters: name - The name of the parameter to locate. Parameters: set - True if function is called from a set / register method. | public Array | getArray(int parameterIndex) | public Array | getArray(String parameterName) | public BigDecimal | getBigDecimal(int parameterIndex) | public BigDecimal | getBigDecimal(int parameterIndex, int scale) | public BigDecimal | getBigDecimal(String parameterName) | public Blob | getBlob(int parameterIndex) | public Blob | getBlob(String parameterName) | public boolean | getBoolean(int parameterIndex) | public boolean | getBoolean(String parameterName) | public byte | getByte(int parameterIndex) | public byte | getByte(String parameterName) | public byte[] | getBytes(int parameterIndex) | public byte[] | getBytes(String parameterName) | public Clob | getClob(int parameterIndex) | public Clob | getClob(String parameterName) | public Date | getDate(int parameterIndex) | public Date | getDate(String parameterName) | public Date | getDate(int parameterIndex, Calendar cal) | public Date | getDate(String parameterName, Calendar cal) | public double | getDouble(int parameterIndex) | public double | getDouble(String parameterName) | public float | getFloat(int parameterIndex) | public float | getFloat(String parameterName) | public int | getInt(int parameterIndex) | public int | getInt(String parameterName) | public long | getLong(int parameterIndex) | public long | getLong(String parameterName) | public Object | getObject(int parameterIndex) | public Object | getObject(String parameterName) | public Object | getObject(int parameterIndex, Map map) | public Object | getObject(String parameterName, Map map) | protected Object | getOutputValue(int parameterIndex) Retrieve the value of an output parameter. | public Ref | getRef(int parameterIndex) | public Ref | getRef(String parameterName) | public short | getShort(int parameterIndex) | public short | getShort(String parameterName) | public String | getString(int parameterIndex) | public String | getString(String parameterName) | public Time | getTime(int parameterIndex) | public Time | getTime(String parameterName) | public Time | getTime(int parameterIndex, Calendar cal) | public Time | getTime(String parameterName, Calendar cal) | public Timestamp | getTimestamp(int parameterIndex) | public Timestamp | getTimestamp(String parameterName) | public Timestamp | getTimestamp(int parameterIndex, Calendar cal) | public Timestamp | getTimestamp(String parameterName, Calendar cal) | public URL | getURL(int parameterIndex) | public URL | getURL(String parameterName) | public void | registerOutParameter(int parameterIndex, int sqlType) | public void | registerOutParameter(int parameterIndex, int sqlType, int scale) | public void | registerOutParameter(int parameterIndex, int sqlType, String typeName) | public void | registerOutParameter(String parameterName, int sqlType) | public void | registerOutParameter(String parameterName, int sqlType, int scale) | public void | registerOutParameter(String parameterName, int sqlType, String typeName) | public void | setAsciiStream(String parameterName, InputStream x, int length) | public void | setBigDecimal(String parameterName, BigDecimal x) | public void | setBinaryStream(String parameterName, InputStream x, int length) | public void | setBoolean(String parameterName, boolean x) | public void | setByte(String parameterName, byte x) | public void | setBytes(String parameterName, byte[] x) | public void | setCharacterStream(String parameterName, Reader reader, int length) | public void | setDate(String parameterName, Date x) | public void | setDate(String parameterName, Date x, Calendar cal) | public void | setDouble(String parameterName, double x) | public void | setFloat(String parameterName, float x) | public void | setInt(String parameterName, int x) | public void | setLong(String parameterName, long x) | public void | setNull(String parameterName, int sqlType) | public void | setNull(String parameterName, int sqlType, String typeName) | public void | setObject(String parameterName, Object x) | public void | setObject(String parameterName, Object x, int targetSqlType) | public void | setObject(String parameterName, Object x, int targetSqlType, int scale) | public void | setShort(String parameterName, short x) | public void | setString(String parameterName, String x) | public void | setTime(String parameterName, Time x) | public void | setTime(String parameterName, Time x, Calendar cal) | public void | setTimestamp(String parameterName, Timestamp x) | public void | setTimestamp(String parameterName, Timestamp x, Calendar cal) | public void | setURL(String parameterName, URL x) | public boolean | wasNull() |
paramWasNull | protected boolean paramWasNull(Code) | | Last parameter retrieved was null.
|
JtdsCallableStatement | JtdsCallableStatement(ConnectionJDBC2 connection, String sql, int resultSetType, int concurrency) throws SQLException(Code) | | Construct a CallableStatement object.
Parameters: connection - The connection owning this statement. Parameters: sql - The SQL statement specifying the procedure to call. Parameters: resultSetType - The result set type eg FORWARD_ONLY. Parameters: concurrency - The result set concurrency eg READ_ONLY. throws: SQLException - |
executeMSBatch | protected SQLException executeMSBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code) | | Execute the SQL batch on a MS server.
Parameters: size - the total size of the batch. Parameters: executeSize - the maximum number of statements to send in one request. Parameters: counts - the returned update counts. Chained exceptions linked to a SQLException . throws: SQLException - |
executeSybaseBatch | protected SQLException executeSybaseBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code) | | Execute the SQL batch on a Sybase server.
For the rare case of CallableStatement batches each statement is executed individually. This ensures that
problems with the server reading into the middle of a statement are avoided. See bug report [1374518] for more
details.
Parameters: size - the total size of the batch Parameters: executeSize - the maximum number of statements to send in one request (ignored for this version of themethod as only one statement will be sent at a time) Parameters: counts - the returned update counts chained exceptions linked to a SQLException throws: SQLException - if a serious error occurs during execution |
findParameter | int findParameter(String name, boolean set) throws SQLException(Code) | | Find a parameter by name.
Parameters: name - The name of the parameter to locate. Parameters: set - True if function is called from a set / register method. The parameter index as an int . throws: SQLException - |
getOutputValue | protected Object getOutputValue(int parameterIndex) throws SQLException(Code) | | Retrieve the value of an output parameter.
Parameters: parameterIndex - the ordinal position of the parameter the parameter value as an Object throws: SQLException - if the parameter has not been set |
registerOutParameter | public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException(Code) | | |
registerOutParameter | public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException(Code) | | |
registerOutParameter | public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException(Code) | | |
registerOutParameter | public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException(Code) | | |
Methods inherited from net.sourceforge.jtds.jdbc.JtdsPreparedStatement | public void addBatch() throws SQLException(Code)(Java Doc) public void addBatch(String sql) throws SQLException(Code)(Java Doc) protected void checkOpen() throws SQLException(Code)(Java Doc) public void clearParameters() throws SQLException(Code)(Java Doc) public void close() throws SQLException(Code)(Java Doc) public boolean execute() throws SQLException(Code)(Java Doc) public boolean execute(String sql) throws SQLException(Code)(Java Doc) public boolean execute(String arg0, int arg1) throws SQLException(Code)(Java Doc) public boolean execute(String arg0, int[] arg1) throws SQLException(Code)(Java Doc) public boolean execute(String arg0, String[] arg1) throws SQLException(Code)(Java Doc) protected SQLException executeMSBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code)(Java Doc) public ResultSet executeQuery() throws SQLException(Code)(Java Doc) public ResultSet executeQuery(String sql) throws SQLException(Code)(Java Doc) protected SQLException executeSybaseBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code)(Java Doc) public int executeUpdate() throws SQLException(Code)(Java Doc) public int executeUpdate(String sql) throws SQLException(Code)(Java Doc) public int executeUpdate(String sql, int getKeys) throws SQLException(Code)(Java Doc) public int executeUpdate(String arg0, int[] arg1) throws SQLException(Code)(Java Doc) public int executeUpdate(String arg0, String[] arg1) throws SQLException(Code)(Java Doc) public ResultSetMetaData getMetaData() throws SQLException(Code)(Java Doc) protected ParamInfo getParameter(int parameterIndex) throws SQLException(Code)(Java Doc) public ParameterMetaData getParameterMetaData() throws SQLException(Code)(Java Doc) protected static String normalizeCall(String sql)(Code)(Java Doc) protected void notSupported(String method) throws SQLException(Code)(Java Doc) public void setArray(int arg0, Array arg1) throws SQLException(Code)(Java Doc) public void setAsciiStream(int parameterIndex, InputStream inputStream, int length) throws SQLException(Code)(Java Doc) public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException(Code)(Java Doc) public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)(Java Doc) public void setBlob(int parameterIndex, Blob x) throws SQLException(Code)(Java Doc) public void setBoolean(int parameterIndex, boolean x) throws SQLException(Code)(Java Doc) public void setByte(int parameterIndex, byte x) throws SQLException(Code)(Java Doc) public void setBytes(int parameterIndex, byte[] x) throws SQLException(Code)(Java Doc) public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException(Code)(Java Doc) public void setClob(int parameterIndex, Clob x) throws SQLException(Code)(Java Doc) void setColMetaData(ColInfo[] value)(Code)(Java Doc) public void setDate(int parameterIndex, Date x) throws SQLException(Code)(Java Doc) public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException(Code)(Java Doc) public void setDouble(int parameterIndex, double x) throws SQLException(Code)(Java Doc) public void setFloat(int parameterIndex, float x) throws SQLException(Code)(Java Doc) public void setInt(int parameterIndex, int x) throws SQLException(Code)(Java Doc) public void setLong(int parameterIndex, long x) throws SQLException(Code)(Java Doc) public void setNull(int parameterIndex, int sqlType) throws SQLException(Code)(Java Doc) public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException(Code)(Java Doc) public void setObject(int parameterIndex, Object x) throws SQLException(Code)(Java Doc) public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException(Code)(Java Doc) public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code)(Java Doc) public void setObjectBase(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code)(Java Doc) void setParamMetaData(ParamInfo[] value)(Code)(Java Doc) protected void setParameter(int parameterIndex, Object x, int targetSqlType, int scale, int length) throws SQLException(Code)(Java Doc) public void setRef(int parameterIndex, Ref x) throws SQLException(Code)(Java Doc) public void setShort(int parameterIndex, short x) throws SQLException(Code)(Java Doc) public void setString(int parameterIndex, String x) throws SQLException(Code)(Java Doc) public void setTime(int parameterIndex, Time x) throws SQLException(Code)(Java Doc) public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException(Code)(Java Doc) public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException(Code)(Java Doc) public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException(Code)(Java Doc) public void setURL(int parameterIndex, URL url) throws SQLException(Code)(Java Doc) public void setUnicodeStream(int parameterIndex, InputStream inputStream, int length) throws SQLException(Code)(Java Doc)
|
Methods inherited from net.sourceforge.jtds.jdbc.JtdsStatement | public void addBatch(String sql) throws SQLException(Code)(Java Doc) void addWarning(SQLWarning w)(Code)(Java Doc) protected void cacheResults() throws SQLException(Code)(Java Doc) public void cancel() throws SQLException(Code)(Java Doc) protected void checkCursorException(SQLException e) throws SQLException(Code)(Java Doc) protected void checkOpen() throws SQLException(Code)(Java Doc) public void clearBatch() throws SQLException(Code)(Java Doc) public void clearWarnings() throws SQLException(Code)(Java Doc) public void close() throws SQLException(Code)(Java Doc) void closeAllResultSets() throws SQLException(Code)(Java Doc) void closeCurrentResultSet() throws SQLException(Code)(Java Doc) public boolean execute(String sql) throws SQLException(Code)(Java Doc) public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc) public boolean execute(String sql, int[] columnIndexes) throws SQLException(Code)(Java Doc) public boolean execute(String sql, String[] columnNames) throws SQLException(Code)(Java Doc) public int[] executeBatch() throws SQLException, BatchUpdateException(Code)(Java Doc) protected SQLException executeMSBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code)(Java Doc) public ResultSet executeQuery(String sql) throws SQLException(Code)(Java Doc) protected boolean executeSQL(String sql, String spName, ParamInfo[] params, boolean returnKeys, boolean update, boolean useCursor) throws SQLException(Code)(Java Doc) protected ResultSet executeSQLQuery(String sql, String spName, ParamInfo[] params, boolean useCursor) throws SQLException(Code)(Java Doc) protected SQLException executeSybaseBatch(int size, int executeSize, ArrayList counts) throws SQLException(Code)(Java Doc) public int executeUpdate(String sql) throws SQLException(Code)(Java Doc) public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc) public int executeUpdate(String sql, int[] columnIndexes) throws SQLException(Code)(Java Doc) public int executeUpdate(String sql, String[] columnNames) throws SQLException(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public Connection getConnection() throws SQLException(Code)(Java Doc) int getDefaultFetchSize()(Code)(Java Doc) public int getFetchDirection() throws SQLException(Code)(Java Doc) public int getFetchSize() throws SQLException(Code)(Java Doc) public ResultSet getGeneratedKeys() throws SQLException(Code)(Java Doc) public int getMaxFieldSize() throws SQLException(Code)(Java Doc) public int getMaxRows() throws SQLException(Code)(Java Doc) SQLDiagnostic getMessages()(Code)(Java Doc) public boolean getMoreResults() throws SQLException(Code)(Java Doc) public boolean getMoreResults(int current) throws SQLException(Code)(Java Doc) public int getQueryTimeout() throws SQLException(Code)(Java Doc) public ResultSet getResultSet() throws SQLException(Code)(Java Doc) public int getResultSetConcurrency() throws SQLException(Code)(Java Doc) public int getResultSetHoldability() throws SQLException(Code)(Java Doc) public int getResultSetType() throws SQLException(Code)(Java Doc) TdsCore getTds()(Code)(Java Doc) public int getUpdateCount() throws SQLException(Code)(Java Doc) public SQLWarning getWarnings() throws SQLException(Code)(Java Doc) protected void initialize() throws SQLException(Code)(Java Doc) static void notImplemented(String method) throws SQLException(Code)(Java Doc) public void setCursorName(String name) throws SQLException(Code)(Java Doc) public void setEscapeProcessing(boolean enable) throws SQLException(Code)(Java Doc) public void setFetchDirection(int direction) throws SQLException(Code)(Java Doc) public void setFetchSize(int rows) throws SQLException(Code)(Java Doc) public void setMaxFieldSize(int max) throws SQLException(Code)(Java Doc) public void setMaxRows(int max) throws SQLException(Code)(Java Doc) public void setQueryTimeout(int seconds) throws SQLException(Code)(Java Doc) protected boolean useCursor(boolean returnKeys, String sqlWord)(Code)(Java Doc)
|
|
|