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.JavaType
RelDataTypeFactory.Builder, RelDataTypeFactory.FieldInfo, RelDataTypeFactory.FieldInfoBuilder
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.util.List<Pair<java.lang.reflect.Type,java.lang.Boolean>>,JavaTypeFactoryImpl.SyntheticRecordType> |
syntheticTypes |
typeSystem
Constructor and Description |
---|
JavaTypeFactoryImpl() |
JavaTypeFactoryImpl(RelDataTypeSystem typeSystem) |
Modifier and Type | Method and Description |
---|---|
RelDataType |
createStructType(java.lang.Class type)
Creates a record type based upon the public fields of a Java class.
|
java.lang.reflect.Type |
createSyntheticType(java.util.List<java.lang.reflect.Type> types)
Creates a synthetic Java class whose fields have the given Java
types.
|
private java.lang.reflect.Type |
createSyntheticType(RelRecordType type)
Creates a synthetic Java class whose fields have the same names and
relational types.
|
RelDataType |
createType(java.lang.reflect.Type type)
Creates a type, deducing whether a record, scalar or primitive type
is needed.
|
private java.lang.reflect.Type |
fieldType(java.lang.reflect.Field field)
Returns the type of a field.
|
java.lang.reflect.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
builder, canonize, canonize, copyType, createDecimalProduct, createDecimalQuotient, createJavaType, createJoinType, createStructType, createStructType, createStructType, createStructType, getDefaultCharset, getTypeSystem, isJavaType, leastRestrictiveStructuredType, useDoubleMultiplication
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
builder, copyType, createArrayType, createDecimalProduct, createDecimalQuotient, createJavaType, createJoinType, createMapType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createStructType, createStructType, createStructType, createStructType, createTypeWithCharsetAndCollation, createTypeWithNullability, createUnknownType, getDefaultCharset, getTypeSystem, leastRestrictive, useDoubleMultiplication
private final java.util.Map<java.util.List<Pair<java.lang.reflect.Type,java.lang.Boolean>>,JavaTypeFactoryImpl.SyntheticRecordType> syntheticTypes
public JavaTypeFactoryImpl()
public JavaTypeFactoryImpl(RelDataTypeSystem typeSystem)
public RelDataType createStructType(java.lang.Class type)
JavaTypeFactory
createStructType
in interface JavaTypeFactory
type
- Java classprivate java.lang.reflect.Type fieldType(java.lang.reflect.Field field)
Takes into account Array
annotations if present.
public RelDataType createType(java.lang.reflect.Type type)
JavaTypeFactory
createType
in interface JavaTypeFactory
type
- Java type, such as a Class
public java.lang.reflect.Type getJavaClass(RelDataType type)
getJavaClass
in interface JavaTypeFactory
public RelDataType toSql(RelDataType type)
JavaTypeFactory
toSql
in interface JavaTypeFactory
public static RelDataType toSql(RelDataTypeFactory typeFactory, RelDataType type)
public java.lang.reflect.Type createSyntheticType(java.util.List<java.lang.reflect.Type> types)
JavaTypeFactory
createSyntheticType
in interface JavaTypeFactory
private JavaTypeFactoryImpl.SyntheticRecordType register(JavaTypeFactoryImpl.SyntheticRecordType syntheticType)
private java.lang.reflect.Type createSyntheticType(RelRecordType type)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.