|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wgen.op.db.Parameter
The encapsulation of Parameters to a DatabaseCall.
| Field Summary | |
private int |
_direction
This parameter's direction IN, OUT, or INOUT. |
private int |
_jdbcType
This parameter's jdbcType or TYPE_NOT_SET if it doesn't know its type. |
private java.util.Map |
_options
Options for this parameter, which can be interpreted by the underlying execution framework. |
private java.lang.Object |
_value
This parameter's value which could be set on the way in or on the way out. |
private static java.util.Map |
CLASS_TO_JDBC_TYPE
Mapping of common classes of input values to their JdbcTypes. |
static int |
DIR_IN
Identifies an input parameter. |
static int |
DIR_INOUT
Identifies a parameter that is both an input and an output parameter. |
static int |
DIR_OUT
Identifies an output parameter. |
static int |
TYPE_NOT_SET
The identifying jdbcType value when it has not been set. |
| Constructor Summary | |
Parameter(int jdbcType)
Constructor for an implicit Out Parameter. |
|
Parameter(java.lang.Object value)
Constructor for an implicit In Parameter. |
|
Parameter(java.lang.Object value,
int jdbcType,
int direction)
Full constructor. |
|
| Method Summary | |
int |
getDirection()
|
int |
getJdbcType()
|
java.util.Map |
getOptions()
Options for handling the values for this parameter. |
java.lang.Object |
getValue()
The input or output value. |
static Parameter |
nullableNumeric(java.lang.Number value)
A numeric input Parameter. |
static Parameter |
nullableNumeric(java.lang.Number value,
int direction)
A numeric Parameter with direction. |
static Parameter |
nullableString(java.lang.String value)
A string input parameter. |
static Parameter |
nullableString(java.lang.String value,
int direction)
A String Parameter with direction. |
void |
setOptions(java.util.Map options)
|
void |
setValue(java.lang.Object value)
The input or output value. |
java.lang.String |
toString()
|
private static int |
tryToLookupType(java.lang.Object value)
Some common classes have JDBC types associated with them that we know about. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final java.util.Map CLASS_TO_JDBC_TYPE
public static final int DIR_IN
public static final int DIR_OUT
public static final int DIR_INOUT
public static final int TYPE_NOT_SET
private final int _direction
private final int _jdbcType
private java.lang.Object _value
private java.util.Map _options
| Constructor Detail |
public Parameter(java.lang.Object value)
value - the input value
public Parameter(java.lang.Object value,
int jdbcType,
int direction)
value - the value for this ParameterjdbcType - a jdbc type understood by the jdbc driverdirection - the direction IN, OUT, or INOUTpublic Parameter(int jdbcType)
jdbcType - a jdbc type understood by the jdbc driver| Method Detail |
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value - the input or output valuepublic int getDirection()
public int getJdbcType()
public java.util.Map getOptions()
HandlingOption,
CallOutputHandler,
ResultSetRowToMapTransformerpublic void setOptions(java.util.Map options)
public java.lang.String toString()
private static int tryToLookupType(java.lang.Object value)
value - the value being set in the parameter
public static Parameter nullableString(java.lang.String value)
value - the value of the input, possibly null
public static Parameter nullableNumeric(java.lang.Number value)
value - the value of the input, possibly null
public static Parameter nullableString(java.lang.String value,
int direction)
value - the value of the input, possibly nulldirection -
public static Parameter nullableNumeric(java.lang.Number value,
int direction)
value - the value of the input, possibly nulldirection -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||