Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
net.sourceforge.jtds.jdbc.ParamInfo
(package private) class ParamInfo
extends java.lang.Object
implements Cloneable
Field Summary | |
(package private) static int |
|
(package private) static int |
|
(package private) static int |
|
(package private) static int |
|
(package private) CharsetInfo |
|
(package private) byte[] |
|
(package private) boolean |
|
(package private) boolean |
|
(package private) boolean |
|
(package private) boolean |
|
(package private) boolean |
|
(package private) int |
|
(package private) int |
|
(package private) int |
|
(package private) String |
|
(package private) Object |
|
(package private) int |
|
(package private) int |
|
(package private) String |
|
(package private) int |
|
(package private) Object |
|
Constructor Summary | |
| |
| |
| |
Method Summary | |
(package private) void |
|
(package private) void |
|
Object |
|
(package private) byte[] |
|
(package private) Object |
|
(package private) String |
|
private static String |
|
private static byte[] |
|
(package private) void |
|
(package private) static final int INPUT
Flag as an input parameter.
- Field Value:
- 0
(package private) static final int OUTPUT
Flag as an output parameter.
- Field Value:
- 1
(package private) static final int RETVAL
Flag as an return value parameter.
- Field Value:
- 2
(package private) static final int UNICODE
Flag as a unicode parameter.
- Field Value:
- 4
(package private) CharsetInfo charsetInfo
Character set descriptor (if different from default)
(package private) byte[] collation
TDS 8 Collation string.
(package private) boolean isOutput
Parameter is an output parameter
(package private) boolean isRetVal
Parameter is used as SP return value
(package private) boolean isSet
IN parameter has been set
(package private) boolean isSetOut
OUT parameter value is set.
(package private) boolean isUnicode
Parameter should be sent as unicode
(package private) int jdbcType
JDBC type constant from java.sql.Types
(package private) int length
Length of InputStream
(package private) int markerPos
Parameter offset in target SQL statement
(package private) String name
Formal parameter name eg @P1
(package private) Object outValue
OUT Parameter value.
(package private) int precision
Parameter decimal precision
(package private) int scale
Parameter decimal scale
(package private) String sqlType
SQL type name eg varchar(10)
(package private) int tdsType
Internal TDS data type
(package private) Object value
Current parameter value
(package private) ParamInfo(String name, int pos, boolean isRetVal, boolean isUnicode)
Construct a parameter for statement caching.
- Parameters:
name
- the formal name of the parameterpos
- the offset of the ? symbol in the parsed SQL stringisRetVal
-true
if the parameter is a return valueisUnicode
-true
if the parameter is Unicode encoded
(package private) ParamInfo(int jdbcType, Object value, int flags)
Construct an initialised parameter with extra attributes.
- Parameters:
jdbcType
- thejava.sql.Type
constant describing this typevalue
- the initial parameter valueflags
- the additional attributes eg OUTPUT, RETVAL, UNICODE etc.
(package private) ParamInfo(int pos, boolean isUnicode)
Construct a parameter with parameter marker offset.
- Parameters:
pos
- the offset of the ? symbol in the target SQL stringisUnicode
-true
if the parameter is Unicode encoded
(package private) ParamInfo(ColInfo ci, String name, Object value, int length)
Construct a parameter based on a result set column.
- Parameters:
ci
- the column descriptorname
- the name for this parameter or nullvalue
- the column data valuelength
- the column data length
(package private) void clearInValue()
Clear the IN parameter value and status.
(package private) void clearOutValue()
Clear the OUT parameter value and status.
public Object clone()
Creates a shallow copy of thisParamInfo
instance. Used by thePreparedStatement
batching implementation to duplicate parameters.
(package private) byte[] getBytes(String charset) throws IOException
Get the byte array value of the parameter.
- Returns:
- The data value as a
byte[]
or null.
(package private) Object getOutValue() throws SQLException
Get the output parameter value.
- Returns:
- the OUT value as an
Object
(package private) String getString(String charset) throws IOException
Get the string value of the parameter.
- Returns:
- The data value as a
String
or null.
private static String loadFromReader(Reader in, int length) throws IOException
Create a String from a Reader stream.
- Parameters:
in
- The Reader object with the data.length
- Number of characters to read.
- Returns:
- The data as a
String
.
private static byte[] loadFromStream(InputStream in, int length) throws IOException
Load a byte array from an InputStream
- Parameters:
in
- The InputStream to read from.length
- The length of the stream.
- Returns:
- The data as a
byte[]
.
(package private) void setOutValue(Object value)
Set the OUT parameter value.
- Parameters:
value
- The data value.