org.eigenbase.sql.type
Class MultisetSqlType

java.lang.Object
  extended by org.eigenbase.reltype.RelDataTypeImpl
      extended by org.eigenbase.sql.type.AbstractSqlType
          extended by org.eigenbase.sql.type.MultisetSqlType
All Implemented Interfaces:
Serializable, Cloneable, RelDataType, RelDataTypeFamily

public class MultisetSqlType
extends AbstractSqlType

MultisetSqlType represents a standard SQL2003 multiset type.

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

Field Summary
private  RelDataType elementType
           
 
Fields inherited from class org.eigenbase.sql.type.AbstractSqlType
isNullable, typeName
 
Fields inherited from class org.eigenbase.reltype.RelDataTypeImpl
digest, fieldList, fields
 
Constructor Summary
MultisetSqlType(RelDataType elementType, boolean isNullable)
          Constructs a new MultisetSqlType.
 
Method Summary
protected  void generateTypeString(StringBuilder sb, boolean withDetail)
          Generates a string representation of this type.
 RelDataType getComponentType()
          Gets the component type if this type is a collection, otherwise null.
 RelDataTypeFamily getFamily()
          Gets a canonical object representing the family of this type.
 
Methods inherited from class org.eigenbase.sql.type.AbstractSqlType
getPrecedenceList, getSqlTypeName, isNullable
 
Methods inherited from class org.eigenbase.reltype.RelDataTypeImpl
computeDigest, equals, getCharset, getCollation, getComparability, 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

elementType

private RelDataType elementType
Constructor Detail

MultisetSqlType

public MultisetSqlType(RelDataType elementType,
                       boolean isNullable)
Constructs a new MultisetSqlType. This constructor should only be called from a factory method.

"Precondition:"
null!=elementType
Method Detail

generateTypeString

protected void generateTypeString(StringBuilder sb,
                                  boolean withDetail)
Description copied from class: RelDataTypeImpl
Generates a string representation of this type.

Specified by:
generateTypeString in class RelDataTypeImpl
Parameters:
sb - StringBuffer into which to generate the string
withDetail - when true, all detail information needed to compute a unique digest (and return from getFullTypeString) should be included;

getComponentType

public RelDataType getComponentType()
Description copied from interface: RelDataType
Gets the component type if this type is a collection, otherwise null.

Specified by:
getComponentType in interface RelDataType
Overrides:
getComponentType in class RelDataTypeImpl
Returns:
canonical type descriptor for components

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 AbstractSqlType
Returns:
canonical object representing type family