T - The Java type corresponding to the CQL type.public abstract class AbstractJdbcType<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRECISION
The default precision value for JDBC types.
|
static int |
DEFAULT_SCALE
The default scale value for JDBC types.
|
| Constructor and Description |
|---|
AbstractJdbcType() |
| Modifier and Type | Method and Description |
|---|---|
abstract T |
compose(Object obj)
Transforms the given object to an instance of the Java type corresponding to this type.
|
abstract Object |
decompose(T obj)
Transforms the given instance of the Java type corresponding to this type to a generic object.
|
abstract int |
getJdbcType()
Gets the JDBC type constant.
|
abstract int |
getPrecision(T obj)
Gets the precision of the given value (if applicable).
|
abstract int |
getScale(T obj)
Gets the scale of the given value (if applicable).
|
abstract Class<T> |
getType()
Gets the Java type corresponding to this type.
|
abstract boolean |
isCaseSensitive()
Gets whether the values of this type are case-sensitive (if applicable).
|
abstract boolean |
isCurrency()
Gets whether the values of this type are currencies (if applicable).
|
abstract boolean |
isSigned()
Gets whether the values of this type are signed (if applicable).
|
abstract boolean |
needsQuotes()
Gets whether the values of this type require quotes.
|
abstract String |
toString(T obj)
Gets a string representation of the given value.
|
public static final int DEFAULT_SCALE
public static final int DEFAULT_PRECISION
public abstract boolean isCaseSensitive()
The implementation should return false if not applicable.
true if the values are case-sensitive, false otherwise.public abstract int getScale(T obj)
The implementation should return 0 if not applicable.
obj - The value.public abstract int getPrecision(T obj)
The implementation should return -1 if not applicable.
obj - The value.public abstract boolean isCurrency()
The implementation should return false if not applicable.
true if the values are currencies, false otherwise.public abstract boolean isSigned()
The implementation should return false if not applicable.
true if the values are signed, false otherwise.public abstract String toString(T obj)
obj - The value.public abstract boolean needsQuotes()
true if the values need to be surrounded by quotes, false otherwise.public abstract Class<T> getType()
public abstract int getJdbcType()
Typespublic abstract T compose(Object obj)
obj - The object.T.Copyright © 2020–2024 ING Bank. All rights reserved.