saffron.rel
Class TypeFactoryImpl.TypeImpl

java.lang.Object
  |
  +--saffron.rel.TypeFactoryImpl.TypeImpl
All Implemented Interfaces:
Type
Direct Known Subclasses:
OJTypeFactoryImpl.OJScalarType, TypeFactoryImpl.CrossType, TypeFactoryImpl.RecordType, TypeFactoryImpl.ScalarType
Enclosing class:
TypeFactoryImpl

protected abstract class TypeFactoryImpl.TypeImpl
extends Object
implements Type

Abstract implementation for Type. Useful if the type contains a set of fields.

Identity is based upon the digest field, which each derived class should set during construction.


Field Summary
protected  String digest
           
protected  Field[] fields
           
 
Constructor Summary
protected TypeFactoryImpl.TypeImpl(Field[] fields)
           
 
Method Summary
protected abstract  String computeDigest()
           
 boolean equals(Object obj)
           
 TypeFactory getFactory()
           
 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.
 int hashCode()
           
 boolean isJoin()
          Whether the type represents a cartesian product of regular types.
 boolean isProject()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fields

protected final Field[] fields

digest

protected String digest
Constructor Detail

TypeFactoryImpl.TypeImpl

protected TypeFactoryImpl.TypeImpl(Field[] fields)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

computeDigest

protected abstract String computeDigest()

getFieldCount

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

Specified by:
getFieldCount in interface Type

getFields

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

Specified by:
getFields in interface Type

getFieldOrdinal

public int getFieldOrdinal(String fieldName)
Specified by:
getFieldOrdinal in interface Type

getField

public Field getField(String fieldName)
Specified by:
getField in interface Type

getFactory

public TypeFactory getFactory()
Specified by:
getFactory in interface Type

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

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

getJoinTypes

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

Specified by:
getJoinTypes in interface Type

isProject

public boolean isProject()
Specified by:
isProject in interface Type

SourceForge.net_Logo