Enum Class JsDataHandler
- All Implemented Interfaces:
Serializable,Comparable<JsDataHandler>,java.lang.constant.Constable
Given the expected type of a column, ensure consistency in the data array
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic JsDataHandlergetHandler(String deephavenType) Object[]process(Object[] data, JsDataHandler.ParseContext context) Normalizes data of the given type to be wrapped in chunks and sent to the server, performing any required type coercion from JS types to what will be expected on the server.static JsDataHandlerReturns the enum constant of this class with the specified name.static JsDataHandler[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
DATE_TIME
-
INTEGER
-
SHORT
-
LONG
-
BYTE
-
CHAR
-
FLOAT
-
DOUBLE
-
BOOLEAN
-
BIG_DECIMAL
-
BIG_INTEGER
-
LOCAL_DATE
-
LOCAL_TIME
-
-
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
-
getHandler
-
process
Normalizes data of the given type to be wrapped in chunks and sent to the server, performing any required type coercion from JS types to what will be expected on the server. Primitive values must not be boxed,but instead should be passed as Double or wrapped as Any (at runtime, these will result in the same thing).- Parameters:
data- the data to parse and normalizecontext- added detail about how the user directs the values to be parsed- Returns:
- the new array, or the existing one if no values were changed
-