Package org.apache.calcite.adapter.file
Enum FileFieldType
- java.lang.Object
-
- java.lang.Enum<FileFieldType>
-
- org.apache.calcite.adapter.file.FileFieldType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FileFieldType>
enum FileFieldType extends java.lang.Enum<FileFieldType>
Type of a field in a Web (HTML) table.Usually, and unless specified explicitly in the header row, a field is of type
STRING
. But specifying the field type in the fields makes it easier to write SQL.Trivially modified from CsvFieldType.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class
clazz
private static java.util.Map<java.lang.String,FileFieldType>
MAP
private Primitive
primitive
-
Constructor Summary
Constructors Modifier Constructor Description private
FileFieldType(Primitive primitive)
private
FileFieldType(Primitive primitive, java.lang.Class clazz)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileFieldType
of(java.lang.String typeString)
RelDataType
toType(JavaTypeFactory typeFactory)
static FileFieldType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FileFieldType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final FileFieldType STRING
-
BOOLEAN
public static final FileFieldType BOOLEAN
-
BYTE
public static final FileFieldType BYTE
-
CHAR
public static final FileFieldType CHAR
-
SHORT
public static final FileFieldType SHORT
-
INT
public static final FileFieldType INT
-
LONG
public static final FileFieldType LONG
-
FLOAT
public static final FileFieldType FLOAT
-
DOUBLE
public static final FileFieldType DOUBLE
-
DATE
public static final FileFieldType DATE
-
TIME
public static final FileFieldType TIME
-
TIMESTAMP
public static final FileFieldType TIMESTAMP
-
-
Field Detail
-
primitive
private final Primitive primitive
-
clazz
private final java.lang.Class clazz
-
MAP
private static final java.util.Map<java.lang.String,FileFieldType> MAP
-
-
Method Detail
-
values
public static FileFieldType[] 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 (FileFieldType c : FileFieldType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileFieldType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toType
public RelDataType toType(JavaTypeFactory typeFactory)
-
of
public static FileFieldType of(java.lang.String typeString)
-
-