public class ParamValue extends Object
Modifier and Type | Field and Description |
---|---|
static int |
PARAM_VALUE_ARRAY |
static int |
PARAM_VALUE_SCALAR |
static int |
PARAM_VALUE_UDT |
Constructor and Description |
---|
ParamValue(int valueType)
Constructor which creates a ParamValue object with the type.
|
ParamValue(String scalarValue)
Constructor which creates a ParamValue object with the scalar value.
|
ParamValue(Struct udt)
Constructor which creates a ParamValue object with an SQL struct.
|
Modifier and Type | Method and Description |
---|---|
void |
addArrayValue(ParamValue value) |
void |
addToArrayValue(ParamValue arrayElement)
Adds the given string to current array types ParamValue.
|
static ParamValue |
convertFromScalarToArray(ParamValue value)
Converts a ParamValue object containing a scalar to another ParamValue object containing
an array.
|
List<ParamValue> |
getArrayValue() |
String |
getScalarValue()
Returns a scalar value of the calling ParamValue object.
|
Struct |
getUdt() |
String |
getValueAsString()
Returns the value of the ParamValue object as a string depending on the type.
|
int |
getValueType()
This getter method exposes the value type of the ParamValue object
which is being used
|
void |
setArrayValue(List<ParamValue> arrayValue) |
void |
setScalarValue(String scalarValue) |
String |
toString() |
public static final int PARAM_VALUE_SCALAR
public static final int PARAM_VALUE_ARRAY
public static final int PARAM_VALUE_UDT
public ParamValue(int valueType)
valueType
- valueTypes as an integerpublic ParamValue(String scalarValue)
scalarValue
- scalar value of the ParamValue object as a string.public ParamValue(Struct udt)
udt
- User Defined Typepublic static ParamValue convertFromScalarToArray(ParamValue value)
value
- ParamValue object containing a scalar value.public int getValueType()
public String getScalarValue()
public String getValueAsString()
SQLException
- SQLExceptionpublic void addToArrayValue(ParamValue arrayElement)
arrayElement
- The value to be addedpublic void setScalarValue(String scalarValue)
public void setArrayValue(List<ParamValue> arrayValue)
public List<ParamValue> getArrayValue()
public void addArrayValue(ParamValue value)
public Struct getUdt()
Copyright © 2019 WSO2. All rights reserved.