Package net.hydromatic.morel.foreign
Enum Converters.FieldConverter
- java.lang.Object
-
- java.lang.Enum<Converters.FieldConverter>
-
- net.hydromatic.morel.foreign.Converters.FieldConverter
-
- All Implemented Interfaces:
Serializable,Comparable<Converters.FieldConverter>
- Enclosing class:
- Converters
static enum Converters.FieldConverter extends Enum<Converters.FieldConverter>
Converts a field from Calcite to Morel format.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FROM_BOOLEANFROM_DATEFROM_FLOATFROM_INTEGERFROM_STRINGFROM_TIMEFROM_TIMESTAMP
-
Constructor Summary
Constructors Modifier Constructor Description privateFieldConverter(Type mlType)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ObjectconvertFrom(Object sourceValue)Given a Calcite row, returns the value of this field in SML format.(package private) static Converters.FieldConvertertoType(org.apache.calcite.rel.type.RelDataType type)static Converters.FieldConvertervalueOf(String name)Returns the enum constant of this type with the specified name.static Converters.FieldConverter[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FROM_BOOLEAN
public static final Converters.FieldConverter FROM_BOOLEAN
-
FROM_INTEGER
public static final Converters.FieldConverter FROM_INTEGER
-
FROM_FLOAT
public static final Converters.FieldConverter FROM_FLOAT
-
FROM_DATE
public static final Converters.FieldConverter FROM_DATE
-
FROM_TIME
public static final Converters.FieldConverter FROM_TIME
-
FROM_TIMESTAMP
public static final Converters.FieldConverter FROM_TIMESTAMP
-
FROM_STRING
public static final Converters.FieldConverter FROM_STRING
-
-
Field Detail
-
mlType
final Type mlType
-
-
Constructor Detail
-
FieldConverter
private FieldConverter(Type mlType)
-
-
Method Detail
-
values
public static Converters.FieldConverter[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Converters.FieldConverter c : Converters.FieldConverter.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Converters.FieldConverter valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
convertFrom
public abstract Object convertFrom(Object sourceValue)
Given a Calcite row, returns the value of this field in SML format.
-
toType
static Converters.FieldConverter toType(org.apache.calcite.rel.type.RelDataType type)
-
-