Package io.micronaut.data.model
Enum Class DataType
- All Implemented Interfaces:
- Serializable,- Comparable<DataType>,- Constable
Enum of basic data types allowing to compile time computation which can then subsequently be used at runtime for fast
 switching.
- Since:
- 1.0.0
- Author:
- graemerocher
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionA big decimal such asBigDecimal.A boolean value.A boolean array.A byte.A byte array.A character.A character array.ADoublevalue.A double array.A class annotated withMappedEntity.AFloatvalue.A long array.AIntegervalue.An integer array.A JSON type.ALongvalue.A long array.An object of an indeterminate type.AShortvalue.A short array.AStringvalue.A string array.ATimevalue.The UUID type.
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic DataTypeObtains the data type for the given type.booleanisArray()Is an array type.booleanGets an indicator telling whether data type is numeric.static DataTypeReturns the enum constant of this class with the specified name.static DataType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
BIGDECIMALA big decimal such asBigDecimal.
- 
BOOLEANA boolean value.
- 
BYTEA byte.
- 
BYTE_ARRAYA byte array. Often stored as binary.
- 
CHARACTERA character.
- 
DATE
- 
TIMESTAMP
- 
TIMEATimevalue.
- 
DOUBLEADoublevalue.
- 
FLOATAFloatvalue.
- 
INTEGERAIntegervalue.
- 
LONGALongvalue.
- 
SHORTAShortvalue.
- 
STRINGAStringvalue.
- 
OBJECTAn object of an indeterminate type.
- 
ENTITYA class annotated withMappedEntity.
- 
JSONA JSON type.
- 
UUIDThe UUID type.
- 
STRING_ARRAYA string array.
- 
SHORT_ARRAYA short array.
- 
INTEGER_ARRAYAn integer array.
- 
LONG_ARRAYA long array.
- 
FLOAT_ARRAYA long array.
- 
DOUBLE_ARRAYA double array.
- 
CHARACTER_ARRAYA character array.
- 
BOOLEAN_ARRAYA boolean array.
 
- 
- 
Field Details- 
EMPTY_DATA_TYPE_ARRAYEmpty array of data types.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
isArraypublic boolean isArray()Is an array type.- Returns:
- true if an array type
 
- 
forTypeObtains the data type for the given type.- Parameters:
- type- The type
- Returns:
- The data type
 
- 
isNumericpublic boolean isNumeric()Gets an indicator telling whether data type is numeric.- Returns:
- true if data type is numeric
 
 
-