Package com.mysql.cj.result
Class DefaultValueFactory<T>
java.lang.Object
com.mysql.cj.result.DefaultValueFactory<T>
- Type Parameters:
T
- value type
- All Implemented Interfaces:
ValueFactory<T>
- Direct Known Subclasses:
AbstractDateTimeValueFactory
,AbstractNumericValueFactory
,BinaryStreamValueFactory
,BooleanValueFactory
,ByteValueFactory
,DbDocValueFactory
public abstract class DefaultValueFactory<T> extends java.lang.Object implements ValueFactory<T>
The default value factory provides a base class that can be used for value factories that do not support creation from every type. The default value factory
will thrown an UnsupportedOperationException for every method and individual methods must be overridden by subclasses.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
jdbcCompliantTruncationForReads
protected PropertySet
pset
-
Constructor Summary
Constructors Constructor Description DefaultValueFactory(PropertySet pset)
-
Method Summary
Modifier and Type Method Description T
createFromBigDecimal(java.math.BigDecimal d)
T
createFromBigInteger(java.math.BigInteger i)
T
createFromBit(byte[] bytes, int offset, int length)
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)
void
setPropertySet(PropertySet pset)
protected T
unsupported(java.lang.String sourceType)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mysql.cj.result.ValueFactory
createFromBytes, getTargetTypeName
-
Field Details
-
jdbcCompliantTruncationForReads
protected boolean jdbcCompliantTruncationForReads -
pset
-
-
Constructor Details
-
Method Details
-
setPropertySet
- Specified by:
setPropertySet
in interfaceValueFactory<T>
-
unsupported
-
createFromDate
- Specified by:
createFromDate
in interfaceValueFactory<T>
-
createFromTime
- Specified by:
createFromTime
in interfaceValueFactory<T>
-
createFromTimestamp
- Specified by:
createFromTimestamp
in interfaceValueFactory<T>
-
createFromDatetime
- Specified by:
createFromDatetime
in interfaceValueFactory<T>
-
createFromLong
- Specified by:
createFromLong
in interfaceValueFactory<T>
-
createFromBigInteger
- Specified by:
createFromBigInteger
in interfaceValueFactory<T>
-
createFromDouble
- Specified by:
createFromDouble
in interfaceValueFactory<T>
-
createFromBigDecimal
- Specified by:
createFromBigDecimal
in interfaceValueFactory<T>
-
createFromBit
- Specified by:
createFromBit
in interfaceValueFactory<T>
-
createFromYear
- Specified by:
createFromYear
in interfaceValueFactory<T>
-
createFromNull
Description copied from interface:ValueFactory
Create result value from intermediate null value.- Specified by:
createFromNull
in interfaceValueFactory<T>
- Returns:
- T object
-