public class JavaTypeFactoryImpl extends SqlTypeFactoryImpl implements JavaTypeFactory
JavaTypeFactory.
NOTE: This class is experimental and subject to change/removal without notice.
| Modifier and Type | Class and Description |
|---|---|
private static class |
JavaTypeFactoryImpl.RecordFieldImpl
Implementation of a field.
|
static class |
JavaTypeFactoryImpl.SyntheticRecordType
Synthetic record type.
|
RelDataTypeFactoryImpl.JavaTypeRelDataTypeFactory.Builder, RelDataTypeFactory.FieldInfo, RelDataTypeFactory.FieldInfoBuilder| Modifier and Type | Field and Description |
|---|---|
private Map<List<Pair<Type,Boolean>>,JavaTypeFactoryImpl.SyntheticRecordType> |
syntheticTypes |
typeSystem| Constructor and Description |
|---|
JavaTypeFactoryImpl() |
JavaTypeFactoryImpl(RelDataTypeSystem typeSystem) |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
createStructType(Class type)
Creates a record type based upon the public fields of a Java class.
|
Type |
createSyntheticType(List<Type> types)
Creates a synthetic Java class whose fields have the given Java
types.
|
private Type |
createSyntheticType(RelRecordType type)
Creates a synthetic Java class whose fields have the same names and
relational types.
|
RelDataType |
createType(Type type)
Creates a type, deducing whether a record, scalar or primitive type
is needed.
|
private Type |
fieldType(Field field)
Returns the type of a field.
|
Type |
getJavaClass(RelDataType type) |
private JavaTypeFactoryImpl.SyntheticRecordType |
register(JavaTypeFactoryImpl.SyntheticRecordType syntheticType) |
RelDataType |
toSql(RelDataType type)
Converts a type in Java format to a SQL-oriented type.
|
static RelDataType |
toSql(RelDataTypeFactory typeFactory,
RelDataType type)
Converts a type in Java format to a SQL-oriented type.
|
canonize, createArrayType, createMapType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createTypeWithCharsetAndCollation, createTypeWithNullability, createUnknownType, leastRestrictive, shouldRaggedFixedLengthValueUnionBeVariablebuilder, canonize, copyType, createDecimalProduct, createDecimalQuotient, createJavaType, createJoinType, createStructType, createStructType, createStructType, createStructType, getDefaultCharset, getTypeSystem, isJavaType, leastRestrictiveStructuredType, useDoubleMultiplicationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, copyType, createArrayType, createDecimalProduct, createDecimalQuotient, createJavaType, createJoinType, createMapType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createStructType, createStructType, createStructType, createStructType, createTypeWithCharsetAndCollation, createTypeWithNullability, createUnknownType, getDefaultCharset, getTypeSystem, leastRestrictive, useDoubleMultiplicationpublic JavaTypeFactoryImpl()
public JavaTypeFactoryImpl(RelDataTypeSystem typeSystem)
public RelDataType createStructType(Class type)
JavaTypeFactorycreateStructType in interface JavaTypeFactorytype - Java classprivate Type fieldType(Field field)
Takes into account Array
annotations if present.
public RelDataType createType(Type type)
JavaTypeFactorycreateType in interface JavaTypeFactorytype - Java type, such as a Classpublic Type getJavaClass(RelDataType type)
getJavaClass in interface JavaTypeFactorypublic RelDataType toSql(RelDataType type)
JavaTypeFactorytoSql in interface JavaTypeFactorypublic static RelDataType toSql(RelDataTypeFactory typeFactory, RelDataType type)
public Type createSyntheticType(List<Type> types)
JavaTypeFactorycreateSyntheticType in interface JavaTypeFactoryprivate JavaTypeFactoryImpl.SyntheticRecordType register(JavaTypeFactoryImpl.SyntheticRecordType syntheticType)
private Type createSyntheticType(RelRecordType type)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.