org.mariadb.jdbc.internal.queryresults

## Class MariaDbValueObject

- java.lang.Object
- - org.mariadb.jdbc.internal.queryresults.MariaDbValueObject

All Implemented Interfaces:
  ValueObject

    public class MariaDbValueObject
    extends Object
    implements ValueObject

Contains the raw value returned from the server. Is immutable

### Field Summary

### Fields inherited from interface org.mariadb.jdbc.internal.queryresults.ValueObject

`TINYINT1_IS_BIT, YEAR_IS_DATE_TYPE`

### Constructor Summary

Constructors
Constructor and Description
`MariaDbValueObject(byte[] rawBytes, ColumnInformation columnInfo, boolean isBinaryEncoded, Options options)` Constructor.
`MariaDbValueObject(byte[] rawBytes, ColumnInformation columnInfo, Options options)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MariaDbValueObject

    public MariaDbValueObject(byte[] rawBytes,
                              ColumnInformation columnInfo,
                              Options options)

Constructor.

Parameters:
  `rawBytes` - raw data
  `columnInfo` - column information
  `options` - session options

#### MariaDbValueObject

    public MariaDbValueObject(byte[] rawBytes,
                              ColumnInformation columnInfo,
                              boolean isBinaryEncoded,
                              Options options)

Constructor.

Parameters:
  `rawBytes` - raw data
  `columnInfo` - column information
  `isBinaryEncoded` - is text or binary encoded.
  `options` - session options

### Method Detail

#### getString

    public String getString()
                     throws SQLException

Specified by:
  `getString` in interface `ValueObject`
Throws:
  `SQLException`

#### getString

    public String getString(Calendar cal)
                     throws SQLException

Get String from raw data.

Specified by:
  `getString` in interface `ValueObject`
Parameters:
  `cal` - session calendar
Returns:
  string
Throws:
  `SQLException`

#### getByte

    public byte getByte()
                 throws SQLException

Get byte from raw data.

Specified by:
  `getByte` in interface `ValueObject`
Returns:
  byte
Throws:
  `SQLException`

#### getShort

    public short getShort()
                   throws SQLException

Get short from raw data.

Specified by:
  `getShort` in interface `ValueObject`
Returns:
  short
Throws:
  `SQLException`

#### getInt

    public int getInt()
               throws SQLException

Get int from raw data.

Specified by:
  `getInt` in interface `ValueObject`
Returns:
  int
Throws:
  `SQLException`

#### getLong

    public long getLong()
                 throws SQLException

Get long from raw data.

Specified by:
  `getLong` in interface `ValueObject`
Returns:
  long
Throws:
  `SQLException`

#### getFloat

    public float getFloat()
                   throws SQLException

Get float from raw data.

Specified by:
  `getFloat` in interface `ValueObject`
Returns:
  float
Throws:
  `SQLException`

#### getDouble

    public double getDouble()
                     throws SQLException

Get double value from raw data.

Specified by:
  `getDouble` in interface `ValueObject`
Returns:
  double
Throws:
  `SQLException`

#### getBigDecimal

    public BigDecimal getBigDecimal()
                             throws SQLException

Get BigDecimal from rax data.

Specified by:
  `getBigDecimal` in interface `ValueObject`
Returns:
  Bigdecimal value
Throws:
  `SQLException`

#### getBytes

    public byte[] getBytes()

Specified by:
  `getBytes` in interface `ValueObject`

#### getBigInteger

    public BigInteger getBigInteger()
                             throws SQLException

Get BigInteger from raw data.

Specified by:
  `getBigInteger` in interface `ValueObject`
Returns:
  bigInteger
Throws:
  `SQLException`

#### getDate

    public Date getDate(Calendar cal)
                 throws ParseException

Get date from raw data.

Specified by:
  `getDate` in interface `ValueObject`
Parameters:
  `cal` - session calendar
Returns:
  date
Throws:
  `ParseException` - if raw data cannot be parse

#### getTime

    public Time getTime(Calendar cal)
                 throws ParseException

Get time from raw data.

Specified by:
  `getTime` in interface `ValueObject`
Parameters:
  `cal` - session calendar
Returns:
  time value
Throws:
  `ParseException` - if raw data cannot be parse

#### getTimestamp

    public Timestamp getTimestamp(Calendar cal)
                           throws ParseException

Get timeStamp from raw data.

Specified by:
  `getTimestamp` in interface `ValueObject`
Parameters:
  `cal` - session calendar.
Returns:
  timestamp.
Throws:
  `ParseException` - if text value cannot be parse

#### getInputStream

    public InputStream getInputStream()

Get inputStream value from raw data.

Specified by:
  `getInputStream` in interface `ValueObject`
Returns:
  inputStream

#### getBinaryInputStream

    public InputStream getBinaryInputStream()

Get binaryInputStream value from raw data.

Specified by:
  `getBinaryInputStream` in interface `ValueObject`
Returns:
  inputStream

#### getBoolean

    public boolean getBoolean()
                       throws SQLException

Get boolean value from raw data.

Specified by:
  `getBoolean` in interface `ValueObject`
Returns:
  boolean
Throws:
  `SQLException`

#### isNull

    public boolean isNull()

Is data null.

Specified by:
  `isNull` in interface `ValueObject`
Returns:
  true if data is null

#### getDisplayLength

    public int getDisplayLength()

Data length.

Returns:
  length

#### getBlob

    public Blob getBlob()

Get Blob from raw data

Specified by:
  `getBlob` in interface `ValueObject`
Returns:
  blob.

#### getClob

    public Clob getClob()

Get Clob from raw data

Returns:
  clob.

#### getObject

    public Object getObject(int dataTypeMappingFlags,
                            Calendar cal)
                     throws SQLException,
                            ParseException

Get object value.

Specified by:
  `getObject` in interface `ValueObject`
Parameters:
  `dataTypeMappingFlags` - dataTypeflag (year is date or int, bit boolean or int, ...)
  `cal` - session calendar
Returns:
  the object value.
Throws:
  `ParseException` - if data cannot be parse
  `SQLException`