Package com.jbstrap.core.enums
Enum Class JSDataType
- All Implemented Interfaces:
Serializable
,Comparable<JSDataType>
,Constable
- Since:
- 4.0
- Author:
- JBStrap
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts the parameter values to a type that is compatible with the data type.static JSDataType
fromColumnDataType
(DataDescriptorColumnDatatype columnType) static JSDataType
fromJavaClass
(Class<?> javaClass) static JSDataType
static JSDataType
fromObject
(Object data) Class<?>
getName()
static JSDataType
Returns the enum constant of this class with the specified name.static JSDataType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
LONG
-
DATE
-
BOOLEAN
-
DOUBLE
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException
- if the argument is null
-
getJavaClass
- Returns:
- The java class
-
getTypePrefix
- Returns:
- The JavaScript data type prefix
-
getName
- Returns:
- The data type name
-
fromColumnDataType
- Parameters:
columnType
- The DataDescriptor column data type- Returns:
- The assigned JavaScript data type
-
fromName
- Parameters:
name
- The data type name- Returns:
- The assigned JavaScript data type
-
fromJavaClass
- Parameters:
javaClass
- The java class- Returns:
- The assigned JavaScript data type
-
fromObject
- Parameters:
data
- The data element- Returns:
- The assigned JavaScript data type or
null
, if datanull
or unkndow data type
-
convert
Converts the parameter values to a type that is compatible with the data type.- Parameters:
value
- Values to be converted- Returns:
- The parameter values converted to the data type
-