org.eigenbase.sql.type
Class AbstractSqlType

java.lang.Object
  extended by org.eigenbase.reltype.RelDataTypeImpl
      extended by org.eigenbase.sql.type.AbstractSqlType
All Implemented Interfaces:
Serializable, Cloneable, RelDataType, RelDataTypeFamily
Direct Known Subclasses:
BasicSqlType, IntervalSqlType, MultisetSqlType, ObjectSqlType

public abstract class AbstractSqlType
extends RelDataTypeImpl
implements Cloneable, Serializable

Abstract base class for SQL implementations of RelDataType.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/type/AbstractSqlType.java#14 $
Author:
jhyde
See Also:
Serialized Form

Field Summary
protected  boolean isNullable
           
protected  SqlTypeName typeName
           
 
Fields inherited from class org.eigenbase.reltype.RelDataTypeImpl
digest, fieldList, fields
 
Constructor Summary
protected AbstractSqlType(SqlTypeName typeName, boolean isNullable, RelDataTypeField[] fields)
          Creates an AbstractSqlType.
 
Method Summary
 RelDataTypeFamily getFamily()
          Gets a canonical object representing the family of this type.
 RelDataTypePrecedenceList getPrecedenceList()
           
 SqlTypeName getSqlTypeName()
          Gets the SqlTypeName of this type.
 boolean isNullable()
          Queries whether this type allows null values.
 
Methods inherited from class org.eigenbase.reltype.RelDataTypeImpl
computeDigest, equals, generateTypeString, getCharset, getCollation, getComparability, getComponentType, getField, getFieldCount, getFieldList, getFieldOrdinal, getFields, getFullTypeString, getIntervalQualifier, getPrecision, getScale, getSqlIdentifier, hashCode, isStruct, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

typeName

protected final SqlTypeName typeName

isNullable

protected boolean isNullable
Constructor Detail

AbstractSqlType

protected AbstractSqlType(SqlTypeName typeName,
                          boolean isNullable,
                          RelDataTypeField[] fields)
Creates an AbstractSqlType.

Parameters:
typeName - Type name
isNullable - Whether nullable
fields - Fields of type, or null if not a record type
Method Detail

getSqlTypeName

public SqlTypeName getSqlTypeName()
Description copied from interface: RelDataType
Gets the SqlTypeName of this type.

Specified by:
getSqlTypeName in interface RelDataType
Overrides:
getSqlTypeName in class RelDataTypeImpl
Returns:
SqlTypeName, or null if this is not an SQL predefined type

isNullable

public boolean isNullable()
Description copied from interface: RelDataType
Queries whether this type allows null values.

Specified by:
isNullable in interface RelDataType
Overrides:
isNullable in class RelDataTypeImpl
Returns:
whether type allows null values

getFamily

public RelDataTypeFamily getFamily()
Description copied from interface: RelDataType
Gets a canonical object representing the family of this type. Two values can be compared if and only if their types are in the same family.

Specified by:
getFamily in interface RelDataType
Overrides:
getFamily in class RelDataTypeImpl
Returns:
canonical object representing type family

getPrecedenceList

public RelDataTypePrecedenceList getPrecedenceList()
Specified by:
getPrecedenceList in interface RelDataType
Overrides:
getPrecedenceList in class RelDataTypeImpl
Returns:
precedence list for this type