All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.xmlmiddleware.xmldbms.datahandlers.Parameters
The methods in this class assume that the arrays of parameter values and Columns are in the same order as the parameters in the SQL statement.
Methods that require parameter values to be of the default object type for the column type use the following default object types:
CHAR, VARCHAR, LONGVARCHAR: String
DATE, TIME, TIMESTAMP: java.sql.Date
BIGINT: Long
INTEGER: Integer
SMALLINT: Short
TINYINT: Byte
DECIMAL, NUMERIC: BigDecimal
DOUBLE, FLOAT: Double
REAL: Float
BINARY, VARBINARY, LONGVARBINARY: org.xmlmiddleware.conversions.ByteArray
BIT: Boolean
public Parameters()
public static void setParameters(PreparedStatement p,
int offset,
Column columns[],
Object values[]) throws SQLException
For best performance, parameter values should be of the default object type for the parameter type.
public static void setParameter(PreparedStatement p,
int number,
Column column,
Object value) throws SQLException
For best performance, parameter values should be of the default object type for the parameter type.
public static void convertAndSetParameters(PreparedStatement p,
int offset,
Column columns[],
Object values[]) throws SQLException
This method checks the object type of the parameter values and performs any necessary conversions before setting the parameter value. If the parameter values are all known to be of the default type, use setParameters instead, since it is faster.
public static void convertAndSetParameter(PreparedStatement p,
int number,
Column column,
Object value) throws SQLException
This method checks the object type of the parameter value and performs any necessary conversion before setting the parameter value. If the parameter value is known to be of the default type, use setParameters instead, since it is faster.
All Packages Class Hierarchy This Package Previous Next Index