org.eigenbase.oj
Class OJTypeFactoryImpl
java.lang.Object
org.eigenbase.reltype.RelDataTypeFactoryImpl
org.eigenbase.sql.type.SqlTypeFactoryImpl
org.eigenbase.oj.OJTypeFactoryImpl
- All Implemented Interfaces:
- OJTypeFactory, RelDataTypeFactory
- Direct Known Subclasses:
- FarragoTypeFactoryImpl
public class OJTypeFactoryImpl
- extends SqlTypeFactoryImpl
- implements OJTypeFactory
Implementation of RelDataTypeFactory
based upon OpenJava's type
system.
- Since:
- May 30, 2003
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/oj/OJTypeFactoryImpl.java#14 $
- Author:
- jhyde
- See Also:
OJClass
,
RelDataTypeFactory
Methods inherited from class org.eigenbase.reltype.RelDataTypeFactoryImpl |
copyType, createDecimalProduct, createDecimalQuotient, createJoinType, createStructType, createStructType, createStructType, getDefaultCharset, isJavaType, leastRestrictiveStructuredType, useDoubleMultiplication |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eigenbase.reltype.RelDataTypeFactory |
copyType, createDecimalProduct, createDecimalQuotient, createJoinType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createStructType, createStructType, createStructType, createTypeWithCharsetAndCollation, createTypeWithNullability, getDefaultCharset, leastRestrictive, useDoubleMultiplication |
mapOJClassToType
protected final HashMap<OJClass,RelDataType> mapOJClassToType
ojClassMap
private final OJClassMap ojClassMap
OJTypeFactoryImpl
public OJTypeFactoryImpl()
- Creates an
OJTypeFactoryImpl
.
OJTypeFactoryImpl
protected OJTypeFactoryImpl(OJClassMap ojClassMap)
createJavaType
public RelDataType createJavaType(Class clazz)
- Description copied from interface:
RelDataTypeFactory
- Creates a type which corresponds to a Java class.
- Specified by:
createJavaType
in interface RelDataTypeFactory
- Overrides:
createJavaType
in class RelDataTypeFactoryImpl
- Parameters:
clazz
- the Java class used to define the type
- Returns:
- canonical Java type descriptor
createArrayType
public RelDataType createArrayType(RelDataType elementType,
long maxCardinality)
- Description copied from interface:
RelDataTypeFactory
- Creates an array type. Arrays are ordered collections of elements.
- Specified by:
createArrayType
in interface RelDataTypeFactory
- Overrides:
createArrayType
in class RelDataTypeFactoryImpl
- Parameters:
elementType
- type of the elements of the arraymaxCardinality
- maximum array size, or -1 for unlimited
- Returns:
- canonical array type descriptor
createOJClassForRecordType
protected OJClass createOJClassForRecordType(OJClass declarer,
RelDataType recordType)
toOJClass
public OJClass toOJClass(OJClass declarer,
RelDataType type)
- Specified by:
toOJClass
in interface OJTypeFactory
toType
public RelDataType toType(OJClass ojClass)
- Specified by:
toType
in interface OJTypeFactory