public class MariaDbValueObject extends AbstractValueObject implements ValueObject
TINYINT1_IS_BIT, YEAR_IS_DATE_TYPE
Constructor and Description |
---|
MariaDbValueObject(byte[] rawBytes,
ColumnInformation columnInfo,
boolean isBinaryEncoded,
Options options)
Constructor.
|
MariaDbValueObject(byte[] rawBytes,
ColumnInformation columnInfo,
Options options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getBigDecimal()
Get BigDecimal from rax data.
|
BigInteger |
getBigInteger()
Get BigInteger from raw data.
|
InputStream |
getBinaryInputStream()
Get binaryInputStream value from raw data.
|
Blob |
getBlob()
Get Blob from raw data
|
boolean |
getBoolean()
Get boolean value from raw data.
|
byte |
getByte()
Get byte from raw data.
|
byte[] |
getBytes() |
Clob |
getClob()
Get Clob from raw data
|
Date |
getDate(Calendar cal)
Get date from raw data.
|
int |
getDisplayLength()
Data length.
|
double |
getDouble()
Get double value from raw data.
|
float |
getFloat()
Get float from raw data.
|
InputStream |
getInputStream()
Get inputStream value from raw data.
|
int |
getInt()
Get int from raw data.
|
long |
getLong()
Get long from raw data.
|
Object |
getObject(int dataTypeMappingFlags,
Calendar cal)
Get object value.
|
short |
getShort()
Get short from raw data.
|
String |
getString() |
String |
getString(Calendar cal)
Get String from raw data.
|
Time |
getTime(Calendar cal)
Get time from raw data.
|
Timestamp |
getTimestamp(Calendar cal)
Get timeStamp from raw data.
|
boolean |
isNull()
Is data null.
|
getObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject
public MariaDbValueObject(byte[] rawBytes, ColumnInformation columnInfo, Options options)
rawBytes
- raw datacolumnInfo
- column informationoptions
- session optionspublic MariaDbValueObject(byte[] rawBytes, ColumnInformation columnInfo, boolean isBinaryEncoded, Options options)
rawBytes
- raw datacolumnInfo
- column informationisBinaryEncoded
- is text or binary encoded.options
- session optionspublic String getString() throws SQLException
getString
in interface ValueObject
SQLException
public String getString(Calendar cal) throws SQLException
getString
in interface ValueObject
cal
- session calendarSQLException
public byte getByte() throws SQLException
getByte
in interface ValueObject
SQLException
public short getShort() throws SQLException
getShort
in interface ValueObject
SQLException
public int getInt() throws SQLException
getInt
in interface ValueObject
SQLException
public long getLong() throws SQLException
getLong
in interface ValueObject
SQLException
public float getFloat() throws SQLException
getFloat
in interface ValueObject
SQLException
public double getDouble() throws SQLException
getDouble
in interface ValueObject
SQLException
public BigDecimal getBigDecimal() throws SQLException
getBigDecimal
in interface ValueObject
SQLException
public byte[] getBytes()
getBytes
in interface ValueObject
public BigInteger getBigInteger() throws SQLException
getBigInteger
in interface ValueObject
SQLException
public Date getDate(Calendar cal) throws ParseException
getDate
in interface ValueObject
cal
- session calendarParseException
- if raw data cannot be parsepublic Time getTime(Calendar cal) throws ParseException
getTime
in interface ValueObject
cal
- session calendarParseException
- if raw data cannot be parsepublic Timestamp getTimestamp(Calendar cal) throws ParseException
getTimestamp
in interface ValueObject
cal
- session calendar.ParseException
- if text value cannot be parsepublic InputStream getInputStream()
getInputStream
in interface ValueObject
public InputStream getBinaryInputStream()
getBinaryInputStream
in interface ValueObject
public boolean getBoolean()
getBoolean
in interface ValueObject
public boolean isNull()
isNull
in interface ValueObject
public int getDisplayLength()
public Blob getBlob()
getBlob
in interface ValueObject
public Clob getClob()
getClob
in interface ValueObject
public Object getObject(int dataTypeMappingFlags, Calendar cal) throws SQLException, ParseException
getObject
in interface ValueObject
dataTypeMappingFlags
- dataTypeflag (year is date or int, bit boolean or int, ...)cal
- session calendarParseException
- if data cannot be parseSQLException
Copyright © 2016. All rights reserved.