public enum ElasticsearchType extends Enum<ElasticsearchType>
Each type encapsulates mapping to its corresponding JDBC Type and associated properties.
Where required, an Elasticsearch data type is mapped to the least
precise JDBCType that can accurately represent it based on
the following:
JDBCType is taken to be the
precision of the corresponding Java type mentioned in
the JDBC Spec - Table B-1: JDBC Types Mapped to Java Types
| 枚举常量和说明 |
|---|
BINARY |
BOOLEAN |
BYTE |
DATE |
DATETIME |
DOUBLE |
FLOAT |
HALF_FLOAT |
INTEGER |
IP |
KEYWORD |
LONG |
NESTED |
NULL |
OBJECT |
SCALED_FLOAT |
SHORT |
STRING |
TEXT |
TIME |
TIMESTAMP |
UNDEFINED |
UNSUPPORTED |
| 限定符和类型 | 方法和说明 |
|---|---|
static ElasticsearchType |
fromJdbcType(JDBCType jdbcType) |
static ElasticsearchType |
fromTypeName(String typeName)
Returns the
ElasticsearchType for the specified elasticsearch
data type name. |
static ElasticsearchType |
fromTypeName(String typeName,
boolean errorOnUnknownType)
Parses a specified Elasticsearch type name to determine
the corresponding
ElasticsearchType |
int |
getDisplaySize() |
String |
getJavaClassName() |
JDBCType |
getJdbcType() |
int |
getPrecision() |
String |
getTypeName() |
boolean |
isSigned() |
int |
sqlTypeNumber() |
static ElasticsearchType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ElasticsearchType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ElasticsearchType BOOLEAN
public static final ElasticsearchType BYTE
public static final ElasticsearchType SHORT
public static final ElasticsearchType INTEGER
public static final ElasticsearchType LONG
public static final ElasticsearchType HALF_FLOAT
public static final ElasticsearchType FLOAT
public static final ElasticsearchType DOUBLE
public static final ElasticsearchType SCALED_FLOAT
public static final ElasticsearchType KEYWORD
public static final ElasticsearchType TEXT
public static final ElasticsearchType STRING
public static final ElasticsearchType IP
public static final ElasticsearchType NESTED
public static final ElasticsearchType OBJECT
public static final ElasticsearchType DATE
public static final ElasticsearchType DATETIME
public static final ElasticsearchType TIME
public static final ElasticsearchType TIMESTAMP
public static final ElasticsearchType BINARY
public static final ElasticsearchType NULL
public static final ElasticsearchType UNDEFINED
public static final ElasticsearchType UNSUPPORTED
public static ElasticsearchType[] values()
for (ElasticsearchType c : ElasticsearchType.values()) System.out.println(c);
public static ElasticsearchType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public static ElasticsearchType fromJdbcType(JDBCType jdbcType)
public static ElasticsearchType fromTypeName(String typeName)
ElasticsearchType for the specified elasticsearch
data type name.public static ElasticsearchType fromTypeName(String typeName, boolean errorOnUnknownType)
ElasticsearchTypetypeName - The Elasticsearch Type name to parseerrorOnUnknownType - If true, the method throws an
UnrecognizedElasticsearchTypeException
if the type name specified is not recognized.ElasticsearchType value corresponding to the
specified type namepublic int sqlTypeNumber()
public boolean isSigned()
public String getTypeName()
public JDBCType getJdbcType()
public String getJavaClassName()
public int getPrecision()
public int getDisplaySize()
Copyright © 2022. All rights reserved.