Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.opencms.dbpool
Class CmsPreparedStatement  view CmsPreparedStatement download CmsPreparedStatement.java

java.lang.Object
  extended bycom.opencms.dbpool.CmsStatement
      extended bycom.opencms.dbpool.CmsPreparedStatement
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement
Direct Known Subclasses:
CmsCallableStatement

public class CmsPreparedStatement
extends CmsStatement
implements java.sql.PreparedStatement

An object that represents a precompiled SQL statement.


Field Summary
 
Fields inherited from class com.opencms.dbpool.CmsStatement
m_con, m_originalStatement
 
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
(package private) CmsPreparedStatement()
          The default-constructor to create a new statement
(package private) CmsPreparedStatement(java.sql.PreparedStatement originalStatement, CmsConnection con)
          The constructor to create a new statement
 
Method Summary
 void addBatch()
          This method adds a set of parameters to the batch for JDBC 2.0.
 void clearParameters()
          This method clears all of the input parameter that have been set on this statement.
 boolean execute()
          This method executes a prepared SQL query.
 java.sql.ResultSet executeQuery()
          This method executes a prepared SQL query and returns its ResultSet.
 int executeUpdate()
          This method executes an SQL INSERT, UPDATE or DELETE statement.
 java.sql.ResultSetMetaData getMetaData()
          This method returns meta data for the result set from this statement.
 java.sql.ParameterMetaData getParameterMetaData()
          Returns information about the parameters set on this PreparedStatement (see java.sql.ParameterMetaData for a detailed description of the provided information).
 void setArray(int i, java.sql.Array x)
          This method sets the specified parameter from the given Java Array value.
 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
          This method sets the specified parameter from the given Java ASCII InputStream value.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
          This method sets the specified parameter from the given Java java.math.BigDecimal value.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
          This method sets the specified parameter from the given Java binary InputStream value.
 void setBlob(int i, java.sql.Blob x)
          This method sets the specified parameter from the given Java Blob value.
 void setBoolean(int parameterIndex, boolean x)
          This method sets the specified parameter from the given Java boolean value.
 void setByte(int parameterIndex, byte x)
          This method sets the specified parameter from the given Java byte value.
 void setBytes(int parameterIndex, byte[] x)
          This method sets the specified parameter from the given Java byte array value.
 void setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
          This method sets the specified parameter from the given Java character Reader value.
 void setClob(int i, java.sql.Clob x)
          This method sets the specified parameter from the given Java Clob value.
 void setDate(int parameterIndex, java.sql.Date x)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDouble(int parameterIndex, double x)
          This method sets the specified parameter from the given Java double value.
 void setFloat(int parameterIndex, float x)
          This method sets the specified parameter from the given Java float value.
 void setInt(int parameterIndex, int x)
          This method sets the specified parameter from the given Java int value.
 void setLong(int parameterIndex, long x)
          This method sets the specified parameter from the given Java long value.
 void setNull(int parameterIndex, int sqlType)
          This method populates the specified parameter with a SQL NULL value for the specified type.
 void setNull(int paramIndex, int sqlType, java.lang.String typeName)
          This method populates the specified parameter with a SQL NULL value for the specified type.
 void setObject(int parameterIndex, java.lang.Object x)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
          This method sets the specified parameter from the given Java Object value.
 void setRef(int i, java.sql.Ref x)
          This method sets the specified parameter from the given Java Ref value.
 void setShort(int parameterIndex, short x)
          This method sets the specified parameter from the given Java short value.
 void setString(int parameterIndex, java.lang.String x)
          This method sets the specified parameter from the given Java String value.
 void setTime(int parameterIndex, java.sql.Time x)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          This method sets the specified parameter from the given Java java.sql.Timestamp value.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Timestamp value.
 void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
          This method sets the specified parameter from the given Java Unicode UTF-8 InputStream value.
 void setURL(int param, java.net.URL uRL)
          This method sets the specified parameter from the given Java java.net.URL value.
 
Methods inherited from class com.opencms.dbpool.CmsStatement
addBatch, cancel, clearBatch, clearWarnings, close, closeOriginalStatement, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Constructor Detail

CmsPreparedStatement

CmsPreparedStatement()
The default-constructor to create a new statement


CmsPreparedStatement

CmsPreparedStatement(java.sql.PreparedStatement originalStatement,
                     CmsConnection con)
The constructor to create a new statement

Method Detail

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method populates the specified parameter with a SQL NULL value for the specified type.

Specified by:
setNull in interface java.sql.PreparedStatement

setNull

public void setNull(int paramIndex,
                    int sqlType,
                    java.lang.String typeName)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method populates the specified parameter with a SQL NULL value for the specified type.

Specified by:
setNull in interface java.sql.PreparedStatement

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java boolean value.

Specified by:
setBoolean in interface java.sql.PreparedStatement

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java byte value.

Specified by:
setByte in interface java.sql.PreparedStatement

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java short value.

Specified by:
setShort in interface java.sql.PreparedStatement

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java int value.

Specified by:
setInt in interface java.sql.PreparedStatement

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java long value.

Specified by:
setLong in interface java.sql.PreparedStatement

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java float value.

Specified by:
setFloat in interface java.sql.PreparedStatement

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java double value.

Specified by:
setDouble in interface java.sql.PreparedStatement

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.math.BigDecimal value.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java String value.

Specified by:
setString in interface java.sql.PreparedStatement

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java byte array value.

Specified by:
setBytes in interface java.sql.PreparedStatement

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Date value.

Specified by:
setDate in interface java.sql.PreparedStatement

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Date value.

Specified by:
setDate in interface java.sql.PreparedStatement

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Time value.

Specified by:
setTime in interface java.sql.PreparedStatement

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Time value.

Specified by:
setTime in interface java.sql.PreparedStatement

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Specified by:
setTimestamp in interface java.sql.PreparedStatement

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x,
                         java.util.Calendar cal)
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Specified by:
setTimestamp in interface java.sql.PreparedStatement

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
                    throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java ASCII InputStream value.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream x,
                             int length)
                      throws java.sql.SQLException
Deprecated. This is deprecated in JDBC 3.0 but still must be implemented

Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Unicode UTF-8 InputStream value.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
                     throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java binary InputStream value.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement

clearParameters

public void clearParameters()
                     throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method clears all of the input parameter that have been set on this statement.

Specified by:
clearParameters in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The default object type to SQL type mapping will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

execute

public boolean execute()
                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes a prepared SQL query. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery and executeUpdate.

Specified by:
execute in interface java.sql.PreparedStatement

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes a prepared SQL query and returns its ResultSet.

Specified by:
executeQuery in interface java.sql.PreparedStatement

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes an SQL INSERT, UPDATE or DELETE statement. SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.PreparedStatement

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method returns meta data for the result set from this statement.

Specified by:
getMetaData in interface java.sql.PreparedStatement

setBlob

public void setBlob(int i,
                    java.sql.Blob x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Blob value. The default object type to SQL type mapping will be used.

Specified by:
setBlob in interface java.sql.PreparedStatement

setArray

public void setArray(int i,
                     java.sql.Array x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Array value. The default object type to SQL type mapping will be used.

Specified by:
setArray in interface java.sql.PreparedStatement

setClob

public void setClob(int i,
                    java.sql.Clob x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Clob value. The default object type to SQL type mapping will be used.

Specified by:
setClob in interface java.sql.PreparedStatement

setRef

public void setRef(int i,
                   java.sql.Ref x)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Ref value. The default object type to SQL type mapping will be used.

Specified by:
setRef in interface java.sql.PreparedStatement

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java character Reader value.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement

addBatch

public void addBatch()
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method adds a set of parameters to the batch for JDBC 2.0.

Specified by:
addBatch in interface java.sql.PreparedStatement

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
Returns information about the parameters set on this PreparedStatement (see java.sql.ParameterMetaData for a detailed description of the provided information).

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement

setURL

public void setURL(int param,
                   java.net.URL uRL)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.net.URL value.

Specified by:
setURL in interface java.sql.PreparedStatement