public enum DefaultSQLValueSerializer extends Enum<DefaultSQLValueSerializer> implements SQLValueSerializer
SQLValueSerializer.| Enum Constant and Description |
|---|
INSTANCE
Singleton instance
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ANSI_DATE_FORMAT |
static String |
ANSI_DATETIME_FORMAT |
static String |
ANSI_TIME_FORMAT |
| Modifier and Type | Method and Description |
|---|---|
String |
serialize(Object value,
com.holonplatform.core.temporal.TemporalType temporalType)
Serialize given value as a SQL string.
|
Optional<String> |
serializeTemporal(Object value,
com.holonplatform.core.temporal.TemporalType temporalType)
Try to serialize given temporal value as a SQL string, using given
temporalType to select a suitable
serialization format. |
static DefaultSQLValueSerializer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DefaultSQLValueSerializer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetDefault, serializepublic static final DefaultSQLValueSerializer INSTANCE
public static final String ANSI_DATE_FORMAT
public static final String ANSI_TIME_FORMAT
public static final String ANSI_DATETIME_FORMAT
public static DefaultSQLValueSerializer[] values()
for (DefaultSQLValueSerializer c : DefaultSQLValueSerializer.values()) System.out.println(c);
public static DefaultSQLValueSerializer valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String serialize(Object value, com.holonplatform.core.temporal.TemporalType temporalType)
SQLValueSerializerserialize in interface SQLValueSerializervalue - Value to serializetemporalType - The TemporalType to use with temporal valuesnull value will be serialized as the NULL stringpublic Optional<String> serializeTemporal(Object value, com.holonplatform.core.temporal.TemporalType temporalType)
SQLValueSerializertemporalType to select a suitable
serialization format.serializeTemporal in interface SQLValueSerializervalue - Value to serializetemporalType - Value temporal typeCopyright © 2019 The Holon Platform. All rights reserved.