|
|||||||||
| Home >> All >> com >> opencms >> [ dbpool overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.dbpool
Class CmsPreparedStatement

java.lang.Objectcom.opencms.dbpool.CmsStatement
com.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
- extends CmsStatement
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 java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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:
setNullin interfacejava.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:
setNullin interfacejava.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
booleanvalue.- Specified by:
setBooleanin interfacejava.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
bytevalue.- Specified by:
setBytein interfacejava.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
shortvalue.- Specified by:
setShortin interfacejava.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
intvalue.- Specified by:
setIntin interfacejava.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
longvalue.- Specified by:
setLongin interfacejava.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
floatvalue.- Specified by:
setFloatin interfacejava.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
doublevalue.- Specified by:
setDoublein interfacejava.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.BigDecimalvalue.- Specified by:
setBigDecimalin interfacejava.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
Stringvalue.- Specified by:
setStringin interfacejava.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
bytearray value.- Specified by:
setBytesin interfacejava.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.Datevalue.- Specified by:
setDatein interfacejava.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.Datevalue.- Specified by:
setDatein interfacejava.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.Timevalue.- Specified by:
setTimein interfacejava.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.Timevalue.- Specified by:
setTimein interfacejava.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.Timestampvalue.- Specified by:
setTimestampin interfacejava.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.Timestampvalue.- Specified by:
setTimestampin interfacejava.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
InputStreamvalue.- Specified by:
setAsciiStreamin interfacejava.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
InputStreamvalue.- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement
- Description copied from interface:
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
InputStreamvalue.- Specified by:
setBinaryStreamin interfacejava.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:
clearParametersin interfacejava.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
Objectvalue. The specified SQL object type will be used.- Specified by:
setObjectin interfacejava.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
Objectvalue. The specified SQL object type will be used.- Specified by:
setObjectin interfacejava.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
Objectvalue. The default object type to SQL type mapping will be used.- Specified by:
setObjectin interfacejava.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:
executein interfacejava.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:
executeQueryin interfacejava.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:
executeUpdatein interfacejava.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:
getMetaDatain interfacejava.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
Blobvalue. The default object type to SQL type mapping will be used.- Specified by:
setBlobin interfacejava.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
Arrayvalue. The default object type to SQL type mapping will be used.- Specified by:
setArrayin interfacejava.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
Clobvalue. The default object type to SQL type mapping will be used.- Specified by:
setClobin interfacejava.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
Refvalue. The default object type to SQL type mapping will be used.- Specified by:
setRefin interfacejava.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
Readervalue.- Specified by:
setCharacterStreamin interfacejava.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:
addBatchin interfacejava.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:
getParameterMetaDatain interfacejava.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.URLvalue.- Specified by:
setURLin interfacejava.sql.PreparedStatement
|
|||||||||
| Home >> All >> com >> opencms >> [ dbpool overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC