saffron.rel
Class TypeFactoryImpl.CrossType

java.lang.Object
  |
  +--saffron.rel.TypeFactoryImpl.TypeImpl
        |
        +--saffron.rel.TypeFactoryImpl.CrossType
All Implemented Interfaces:
Type
Enclosing class:
TypeFactoryImpl

protected class TypeFactoryImpl.CrossType
extends TypeFactoryImpl.TypeImpl

Type of the cartesian product of two or more sets of records.

Its fields are those of its constituent records, but unlike a TypeFactoryImpl.RecordType, those fields' names are not necessarily distinct.


Field Summary
 Type[] types
           
 
Fields inherited from class saffron.rel.TypeFactoryImpl.TypeImpl
digest, fields
 
Constructor Summary
TypeFactoryImpl.CrossType(Type[] types)
          Creates a cartesian product type.
 
Method Summary
protected  String computeDigest()
           
 Field getField(String fieldName)
           
 int getFieldCount()
          Returns the number of columns.
 int getFieldOrdinal(String fieldName)
           
 Field[] getFields()
          Returns the columns.
 Type[] getJoinTypes()
          Returns the component types of a join type.
 boolean isJoin()
          Whether the type represents a cartesian product of regular types.
 
Methods inherited from class saffron.rel.TypeFactoryImpl.TypeImpl
equals, getFactory, hashCode, isProject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

types

public final Type[] types
Constructor Detail

TypeFactoryImpl.CrossType

public TypeFactoryImpl.CrossType(Type[] types)
Creates a cartesian product type.

Pre-condition:
types != null, types.length >= 1, !(types[i] instanceof CrossType)
Method Detail

computeDigest

protected String computeDigest()
Specified by:
computeDigest in class TypeFactoryImpl.TypeImpl

getFieldCount

public int getFieldCount()
Description copied from interface: Type
Returns the number of columns.

Specified by:
getFieldCount in interface Type
Overrides:
getFieldCount in class TypeFactoryImpl.TypeImpl

getFields

public Field[] getFields()
Description copied from interface: Type
Returns the columns.

Specified by:
getFields in interface Type
Overrides:
getFields in class TypeFactoryImpl.TypeImpl

getFieldOrdinal

public int getFieldOrdinal(String fieldName)
Specified by:
getFieldOrdinal in interface Type
Overrides:
getFieldOrdinal in class TypeFactoryImpl.TypeImpl

getField

public Field getField(String fieldName)
Specified by:
getField in interface Type
Overrides:
getField in class TypeFactoryImpl.TypeImpl

isJoin

public boolean isJoin()
Description copied from interface: Type
Whether the type represents a cartesian product of regular types.

Specified by:
isJoin in interface Type
Overrides:
isJoin in class TypeFactoryImpl.TypeImpl

getJoinTypes

public Type[] getJoinTypes()
Description copied from interface: Type
Returns the component types of a join type.

Specified by:
getJoinTypes in interface Type
Overrides:
getJoinTypes in class TypeFactoryImpl.TypeImpl

SourceForge.net_Logo