com.mysql.cj.result

## Interface ValueFactory<T>

Type Parameters:
  `T` - value type

    public interface ValueFactory<T>

A class implements the `ValueFactory<T>` interface to create value instances from intermediate forms.

A `ValueFactory` implementation is responsible for creating instance of a single type, supplying a value for the type parameter `T`. If an instance cannot be created from the intermediate form, an `UnsupportedOperationException` can be thrown.

### Method Summary

All Methods Instance Methods Abstract Methods
`T` `createFromBigDecimal(BigDecimal d)`
`T` `createFromBigInteger(BigInteger i)`
`T` `createFromBit(byte[] bytes, int offset, int length)`
`T` `createFromBytes(byte[] bytes, int offset, int length, Field f)`
`T` `createFromDate(InternalDate idate)`
`T` `createFromDatetime(InternalTimestamp its)`
`T` `createFromDouble(double d)`
`T` `createFromLong(long l)`
`T` `createFromNull()` Create result value from intermediate null value.
`T` `createFromTime(InternalTime it)`
`T` `createFromTimestamp(InternalTimestamp its)`
`T` `createFromYear(long l)`
`String` `getTargetTypeName()` Get the actual class name of T parameter.
`void` `setPropertySet(PropertySet pset)`

### Method Detail

#### setPropertySet

    void setPropertySet(PropertySet pset)

#### createFromDate

    T createFromDate(InternalDate idate)

#### createFromTime

    T createFromTime(InternalTime it)

#### createFromTimestamp

    T createFromTimestamp(InternalTimestamp its)

#### createFromDatetime

    T createFromDatetime(InternalTimestamp its)

#### createFromLong

    T createFromLong(long l)

#### createFromBigInteger

    T createFromBigInteger(BigInteger i)

#### createFromDouble

    T createFromDouble(double d)

#### createFromBigDecimal

    T createFromBigDecimal(BigDecimal d)

#### createFromBytes

    T createFromBytes(byte[] bytes,
                      int offset,
                      int length,
                      Field f)

#### createFromBit

    T createFromBit(byte[] bytes,
                    int offset,
                    int length)

#### createFromYear

    T createFromYear(long l)

#### createFromNull

    T createFromNull()

Create result value from intermediate null value.

Returns:
  T object

#### getTargetTypeName

    String getTargetTypeName()

Get the actual class name of T parameter.

Returns:
  class name

Copyright © 2016, 2023, Oracle and/or its affiliates.