public class DefaultDataType extends java.lang.Object implements DataType
DataType.NumberPrecisionAndScaleBYTE_DEFAULT_PRECISION, BYTE_MAX_PRECISION, DECIMAL_DEFAULT_PRECISION, DECIMAL_DEFAULT_SCALE, DECIMAL_MAX_PRECISION, DOUBLE_DEFAULT_PRECISION, DOUBLE_DEFAULT_SCALE, DOUBLE_MAX_PRECISION, FLAG_FLOATING_POINT, FLAG_NONE, FLAG_NUMBER, FLAG_PREDEFINED_PRECISION, FLAG_SUPPORT_PRECISION, FLAG_SUPPORT_SCALE, FLAG_SUPPORT_SIZE, FLOAT_DEFAULT_PRECISION, FLOAT_DEFAULT_SCALE, FLOAT_MAX_PRECISION, INT_DEFAULT_PRECISION, INT_MAX_PRECISION, LOCALE_DEFAULT_SIZE, LONG_DEFAULT_PRECISION, LONG_MAX_PRECISION, NO, PRECISION_NONE, SCALE_NONE, STRING_DEFAULT_SIZE, UNKNOWN, YES| Modifier and Type | Method and Description |
|---|---|
DataType |
addAlias(java.lang.String alias) |
void |
addCoercion(Coercion coercion) |
DataType |
clone()
Creates a copy of the object.
|
java.lang.Object |
coerce(java.lang.Object value) |
java.lang.Object |
coerce(java.lang.Object value,
CoercionContext context) |
DataType.NumberPrecisionAndScale |
fixPrecisionAndScale(int precision,
int scale) |
java.util.Collection<java.lang.String> |
getAlias() |
Coercion |
getCoercion() |
java.lang.Class |
getDefaultClass() |
int |
getDefaultPrecision() |
int |
getDefaultScale() |
int |
getDefaultSize() |
int |
getFlags() |
java.lang.String |
getIconName() |
java.lang.String |
getLabel() |
int |
getMaxPrecision() |
java.lang.String |
getName() |
java.lang.String |
getSubtype() |
int |
getType() |
DataType |
getValue() |
boolean |
isContainer() |
boolean |
isDynObject() |
boolean |
isFloatingPoint() |
boolean |
isNumeric() |
boolean |
isObject() |
boolean |
isPredefinedPrecision() |
void |
setCoercion(Coercion coercion) |
DataType |
setDefaultSize(int size) |
boolean |
supportPrecision() |
boolean |
supportScale() |
boolean |
supportSize() |
java.lang.String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlabelcloneQuietly, cloneQuietlypublic DataType clone() throws java.lang.CloneNotSupportedException
Cloneableclone in interface DataTypeclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.public java.lang.String getLabel()
getLabel in interface LabeledValue<DataType>public DataType getValue()
getValue in interface LabeledValue<DataType>public java.lang.Object coerce(java.lang.Object value)
throws CoercionException
coerce in interface DataTypeCoercionExceptionpublic java.lang.Object coerce(java.lang.Object value,
CoercionContext context)
throws CoercionException
coerce in interface DataTypeCoercionExceptionpublic Coercion getCoercion()
getCoercion in interface DataTypepublic java.lang.Class getDefaultClass()
getDefaultClass in interface DataTypepublic java.lang.String getSubtype()
getSubtype in interface DataTypepublic java.lang.String getIconName()
getIconName in interface DataTypepublic boolean isContainer()
isContainer in interface DataTypepublic boolean isDynObject()
isDynObject in interface DataTypepublic void setCoercion(Coercion coercion)
public void addCoercion(Coercion coercion)
addCoercion in interface DataTypepublic java.lang.String toString()
toString in interface LabeledValue<DataType>toString in class java.lang.Objectpublic boolean supportSize()
supportSize in interface DataTypepublic boolean supportPrecision()
supportPrecision in interface DataTypepublic boolean supportScale()
supportScale in interface DataTypepublic boolean isPredefinedPrecision()
isPredefinedPrecision in interface DataTypepublic boolean isFloatingPoint()
isFloatingPoint in interface DataTypepublic DataType.NumberPrecisionAndScale fixPrecisionAndScale(int precision, int scale)
fixPrecisionAndScale in interface DataTypepublic int getMaxPrecision()
getMaxPrecision in interface DataTypepublic int getDefaultPrecision()
getDefaultPrecision in interface DataTypepublic int getDefaultScale()
getDefaultScale in interface DataTypepublic int getDefaultSize()
getDefaultSize in interface DataTypepublic DataType setDefaultSize(int size)
setDefaultSize in interface DataTypepublic DataType addAlias(java.lang.String alias)