|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fatwire.cs.core.db.StatementParam
public final class StatementParam
This class represents the data supplied to the execution of a prepared statement. The data is substituted in place of placeholders while executing the prepared statement.
The JDBC specifications mandate the following mapping between Java Object types and native SQL types.| Java Object | Type JDBC Type |
| String | CHAR, VARCHAR, or LONGVARCHAR |
| java.math.BigDecimal | NUMERIC |
| Boolean | BIT or BOOLEAN |
| Integer | INTEGER |
| Long | BIGINT |
| Float | REAL |
| Double | DOUBLE |
| byte[] | BINARY, VARBINARY, or LONGVARBINARY |
| java.sql.Date | DATE |
| java.sql.Time | TIME |
| java.sql.Timestamp | TIMESTAMP |
| Clob | CLOB |
| Blob | BLOB |
| Array | ARRAY |
| Struct | STRUCT |
| Ref | REF |
| java.net.URL | DATALINK |
| Java class | JAVA_OBJECT |
| Method Summary | |
|---|---|
java.lang.Object |
getAt(int position)
Returns data for a given position |
int |
getPositionsCount()
Returns the number of positions (placeholders) |
boolean |
isComplete()
Indicates if this instance is completely formed (bound with data). |
void |
setBigDecimal(int parameterIndex,
java.math.BigDecimal value)
Sets a BigDecimal value at a given position |
void |
setBinary(int parameterIndex,
byte[] binData)
Sets Binary value for a given position |
void |
setBoolean(int parameterIndex,
boolean bValue)
Sets boolean value at a given index |
void |
setByte(int parameterIndex,
byte byteVal)
Sets byte at a given position |
void |
setDate(int parameterIndex,
java.sql.Date dtValue)
Sets a Date vlaue a given position |
void |
setDouble(int parameterIndex,
double dDoubleVal)
Sets a double value at a given position |
void |
setFloat(int parameterIndex,
float fFloatVal)
Sets a float value at a given position |
void |
setInt(int parameterIndex,
int iIntVal)
Sets an int value at a given position |
void |
setLong(int parameterIndex,
long lLongVal)
Sets a long value at a given position |
void |
setNull(int pos)
Sets 'null' at a given position |
void |
setShort(int parameterIndex,
short shortVal)
Sets a short value at a given position |
void |
setString(int parameterIndex,
java.lang.String sValue)
Sets a String value at a given position |
void |
setTime(int parameterIndex,
java.sql.Time time)
Sets Time value for a given position |
void |
setTimeStamp(int parameterIndex,
java.sql.Timestamp time)
Sets Timestamp value for a given position |
java.lang.String |
toString()
Useful String representation of the object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void setNull(int pos)
pos - position (0 based)
public void setBoolean(int parameterIndex,
boolean bValue)
parameterIndex - position (0 based)bValue - boolean value to set
public void setByte(int parameterIndex,
byte byteVal)
parameterIndex - position (0 based)byteVal - byte value to set
public void setShort(int parameterIndex,
short shortVal)
parameterIndex - position (0 based)shortVal - short value to set
public void setInt(int parameterIndex,
int iIntVal)
parameterIndex - position (0 based)iIntVal - int value to set
public void setLong(int parameterIndex,
long lLongVal)
parameterIndex - position (0 based)lLongVal - long value to set
public void setFloat(int parameterIndex,
float fFloatVal)
parameterIndex - position (0 based)fFloatVal - float value to set
public void setDouble(int parameterIndex,
double dDoubleVal)
parameterIndex - position (0 based)dDoubleVal - double value to set
public void setBigDecimal(int parameterIndex,
java.math.BigDecimal value)
parameterIndex - position (0 based)value - long value to set
public void setString(int parameterIndex,
java.lang.String sValue)
parameterIndex - position (0 based)sValue - String value to set
public void setDate(int parameterIndex,
java.sql.Date dtValue)
parameterIndex - position (0 based)dtValue - Date value to set
public void setTime(int parameterIndex,
java.sql.Time time)
parameterIndex - position (0 based)time - java.sql.Time value to set
public void setTimeStamp(int parameterIndex,
java.sql.Timestamp time)
parameterIndex - position (0 based)time - java.sql.Timestamp value to set
public void setBinary(int parameterIndex,
byte[] binData)
parameterIndex - position (0 based)binData - binary data to setpublic boolean isComplete()
public java.lang.Object getAt(int position)
position - index of placeholder
public int getPositionsCount()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||