public class PreparableStatement extends Object implements Serializable
| Constructor and Description |
|---|
PreparableStatement(String stmt)
Creates a new PreparableStatement object.
|
PreparableStatement(String stmt,
int... types)
Creates a new PreparableStatement object.
|
| Modifier and Type | Method and Description |
|---|---|
static PreparableStatement |
fromString(String s)
Not intended to do object deserialisation.
|
Object[] |
getObjects()
The actual values for the parameters.
|
String |
getStatement()
The statement.
|
int[] |
getTypes()
The types of the parameters of the statement,
null if the types shall be inferred by the jdbc
driver. |
PreparedStatement |
parameterise(Connection c)
Creates a
PreparedStatement using the parameterised statement, the types of this instance or the
types of the jdbc driver if the types of this instance is null and the actual objects. |
void |
setObjects(Object... objects)
Sets the actual objects that shall be used for parameterisation.
|
String |
toString()
This operation is only for debugging purposes.
|
static String |
toString(PreparableStatement ps)
Not intended to do object serialisation as the result will not contain any info of the available objects.
|
public PreparableStatement(String stmt)
PreparableStatement(java.lang.String, int...) with
null for types array.stmt - the parameterised statement, not nullpublic PreparableStatement(String stmt, int... types)
null for the types array is provided then the
parameterise operation will assume that the types are properly inferred by the jdbc driver.stmt - the parameterised statement, not nulltypes - an int array with the types of the single parameters, sorted by occurrence in statement, or
null if the types shall be inferred by the jdbc driver.IllegalArgumentException - if the stmt is nullpublic String getStatement()
public int[] getTypes()
null if the types shall be inferred by the jdbc
driver.public Object[] getObjects()
public void setObjects(Object... objects)
objects - the objects to use during parameterisationIllegalArgumentException - if objects is null or if the number of object does not match the
number of types if the types are not nullpublic PreparedStatement parameterise(Connection c) throws SQLException
PreparedStatement using the parameterised statement, the types of this instance or the
types of the jdbc driver if the types of this instance is null and the actual objects.c - a jdbc connection to create the statementPreparedStatement ready for executionSQLException - if there is an error during parameterisationIllegalStateException - if the objects have not been set (objects are null)public String toString()
public static PreparableStatement fromString(String s)
s - the string to parsePreparableStatement with the appropriate settingsIllegalStateException - DOCUMENT ME!PreparableStatement(java.lang.String, int...),
toString(Sirius.server.sql.PreparableStatement)public static String toString(PreparableStatement ps)
fromString(java.lang.String).ps - the object to convert to the string representationCopyright © 2012–2026 cismet GmbH. All rights reserved.