copyFrom
public void copyFrom(XSQLVAR original)
Copy constructor. Initialize this instance of XSQLVAR with
values from another instance.
original - The other instance of XSQLVAR to be used
as the base for initializing this instance
copyFrom
public void copyFrom(XSQLVAR original,
boolean copyData) Copy constructor. Initialize this instance of XSQLVAR with
values from another instance.
original - The other instance of XSQLVAR to be used
as the base for initializing this instance
decodeDate
public java.sql.Date decodeDate(Date d,
Calendar cal) Decode a Date value using a given Calendar.
d - The Date to be decodedcal - The Calendar to be used in the decoding, may
be null
decodeDate
public Date decodeDate(byte[] byte_int)
Decode a byte array into a Date value.
byte_int - The byte array to be decoded
decodeDouble
public double decodeDouble(byte[] byte_int)
Decode a byte array into a double value.
byte_int - The byte array to be decoded
- The
double value of the decoded
byte array
decodeFloat
public float decodeFloat(byte[] byte_int)
Decode a byte array into a float value.
byte_int - The byte array to be decoded
- The
float value of the decoded
byte array
decodeInt
public int decodeInt(byte[] byte_int)
Decode a byte array into an int value.
byte_int - The byte array to be decoded
- The
int value of the decoded
byte array
decodeLong
public long decodeLong(byte[] byte_int)
Decode a byte array into a long value.
byte_int - The byte array to be decoded
- The
long value of the decoded
byte array
decodeShort
public short decodeShort(byte[] byte_int)
Decode a byte array into a short value.
byte_int - The byte array to be decoded
- The
short value of the decoded
byte array
decodeString
public String decodeString(byte[] value,
String encoding,
String mappingPath)
throws SQLException Decode an encoded byte array into a String
using a given encoding.
value - The value to be decodedencoding - The encoding to be used in the decoding processmappingPath - The character mapping path to be used in the decoding
decodeTime
public Time decodeTime(byte[] int_byte)
Decode a byte array into a Time value.
int_byte - The byte array to be decoded
decodeTime
public java.sql.Time decodeTime(java.sql.Time d,
Calendar cal,
boolean invertTimeZone) Decode a Time value using a given Calendar.
d - The Time to be decodedcal - The Calendar to be used in the decoding, may
be null
decodeTimestamp
public java.sql.Timestamp decodeTimestamp(Timestamp value,
Calendar cal) Decode a Timestamp value using a given
Calendar.
value - The Timestamp to be decodedcal - The Calendar to be used in decoding,
may be null
decodeTimestamp
public java.sql.Timestamp decodeTimestamp(Timestamp value,
Calendar cal,
boolean invertTimeZone) Decode a Timestamp value using a given
Calendar.
value - The Timestamp to be decodedcal - The Calendar to be used in decoding,
may be nullinvertTimeZone - If true, the timezone offset value
will be subtracted from the decoded value, otherwise it will
be added
decodeTimestamp
public Timestamp decodeTimestamp(byte[] byte_int)
Decode a byte array into a Timestamp.
byte_int - The byte array to be decoded
- A
Timestamp value from the decoded
bytes
deepCopy
public XSQLVAR deepCopy()
Get a deep copy of this object.
- deep copy of this object.
encodeDate
public byte[] encodeDate(Date d)
Encode a Date value into a byte array.
d - The Date to be encoded
- The array of
bytes representing the given
Date
encodeDate
public Date encodeDate(java.sql.Date d,
Calendar cal) Encode a given Date value using a given
Calendar.
d - The Date to be encodedcal - The Calendar to be used in the encoding,
may be null
encodeDouble
public byte[] encodeDouble(double value)
Encode a double value as a byte array.
value - The value to be encoded
- The value of
value encoded as a
byte array
encodeFloat
public byte[] encodeFloat(float value)
Encode a float value as a byte array.
value - The value to be encoded
- The value of
value encoded as a
byte array
encodeInt
public byte[] encodeInt(int value)
Encode an int value as a byte array.
value - The value to be encoded
- The value of
value encoded as a
byte array
encodeLong
public byte[] encodeLong(long value)
Encode a long value as a byte array.
value - The value to be encoded
- The value of
value encoded as a
byte array
encodeShort
public byte[] encodeShort(short value)
Encode a short value as a byte array.
value - The value to be encoded
- The value of
value encoded as a
byte array
encodeString
public byte[] encodeString(String value,
String encoding,
String mappingPath)
throws SQLException Encode a String value into a byte array using
a given encoding.
value - The String to be encodedencoding - The encoding to use in the encoding processmappingPath - The character mapping path to be used in the encoding
- The value of
value as a byte array
encodeString
public byte[] encodeString(byte[] value,
String encoding,
String mappingPath)
throws SQLException Encode a byte array using a given encoding.
value - The byte array to be encodedencoding - The encoding to use in the encoding processmappingPath - The character mapping path to be used in the encoding
- The value of
value encoded using the given encoding
encodeTime
public byte[] encodeTime(Time d)
Encode a Time value into a byte array.
d - The Time to be encoded
- The array of
bytes representing the given
Time
encodeTime
public java.sql.Time encodeTime(Time d,
Calendar cal,
boolean invertTimeZone) Encode a given Time value using a given
Calendar.
d - The Time to be encodedcal - The Calendar to be used in the encoding,
may be null
encodeTimestamp
public byte[] encodeTimestamp(Timestamp value)
Encode a Timstamp as a byte array.
value - The Timstamp to be encoded
- The array of
bytes that represents the given
Timestamp value
encodeTimestamp
public Timestamp encodeTimestamp(java.sql.Timestamp value,
Calendar cal) Encode a Timestamp using a given Calendar.
value - The Timestamp to be encodedcal - The Calendar to be used for encoding,
may be null
encodeTimestamp
public Timestamp encodeTimestamp(java.sql.Timestamp value,
Calendar cal,
boolean invertTimeZone) Encode a Timestamp using a given Calendar.
value - The Timestamp to be encodedcal - The Calendar to be used for encoding,
may be nullinvertTimeZone - If true, the timezone offset value
will be subtracted from the encoded value, otherwise it will
be added