@Concealed
public final class RestTypeConverter
extends java.lang.Object
Date
and Timestamp values are converted in accordance with
ISO-8601 standard.
e.g.)
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDefaultEncoding()
Returns the default encoding used by the REST framework.
|
static java.lang.Object |
toJavaType(java.lang.String str,
AttributeDef attrDef)
Converts string based on the attribute definition.
|
static java.lang.Object |
toJavaType(java.lang.String str,
java.lang.Class javaType)
Converts string to requested Java type.
|
static java.lang.Object |
toPayloadType(java.lang.Object obj) |
static java.lang.Object |
toPayloadType(java.lang.Object obj,
AttributeDef attrDef)
Converts object to Java type compatible with REST payload.
|
public static java.lang.String getDefaultEncoding()
public static final java.lang.Object toPayloadType(java.lang.Object obj,
AttributeDef attrDef)
Date or Timestamp objects
are formatted to ISO-8601 compliant string.obj - an object to be converted to REST payload typeattrDef - attribute defpublic static final java.lang.Object toPayloadType(java.lang.Object obj)
public static final java.lang.Object toJavaType(java.lang.String str,
java.lang.Class javaType)
DataCreationException is thrown.str - string representing a value. Must be compliant with ISO-8601 standard if Date or Timestamp.javaType - class to be converted to.public static final java.lang.Object toJavaType(java.lang.String str,
AttributeDef attrDef)
toJavaType(String, Class)str - string representing a value.attrDef - attribute definition to be used in the convertion.