net.sf.saffron.core
Interface SaffronType

All Known Implementing Classes:
SaffronTypeFactoryImpl.SqlType, SaffronTypeFactoryImpl.TypeImpl

public interface SaffronType

The type of a scalar expression or a row returned from a relational expression.

Since:
May 29, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/core/SaffronType.java#2 $
Author:
jhyde

Method Summary
 boolean equalsSansNullability(SaffronType type)
          Whether this type is identical to another, save for differences in nullability.
 void format(Object value, PrintWriter pw)
          Prints a value of this type.
 SaffronType getArrayType()
          Returns an array type with this type as the component.
 SaffronType getComponentType()
          Returns the component type if type is a collection, otherwise null.
 SaffronTypeFactory getFactory()
           
 SaffronField getField(String fieldName)
           
 int getFieldCount()
          Returns the number of columns.
 int getFieldOrdinal(String fieldName)
           
 SaffronField[] getFields()
          Returns the columns.
 SaffronType[] getJoinTypes()
          Returns the component types of a join type.
 boolean isJoin()
          Whether the type represents a cartesian product of regular types.
 boolean isProject()
           
 

Method Detail

getFactory

public SaffronTypeFactory getFactory()

getField

public SaffronField getField(String fieldName)

getFieldCount

public int getFieldCount()
Returns the number of columns.


getFieldOrdinal

public int getFieldOrdinal(String fieldName)

getFields

public SaffronField[] getFields()
Returns the columns.

Post-condition:
return != null

isJoin

public boolean isJoin()
Whether the type represents a cartesian product of regular types.


getJoinTypes

public SaffronType[] getJoinTypes()
Returns the component types of a join type.

Pre-condition:
isJoin()

isProject

public boolean isProject()

equalsSansNullability

public boolean equalsSansNullability(SaffronType type)
Whether this type is identical to another, save for differences in nullability.


format

public void format(Object value,
                   PrintWriter pw)
Prints a value of this type.


getComponentType

public SaffronType getComponentType()
Returns the component type if type is a collection, otherwise null.


getArrayType

public SaffronType getArrayType()
Returns an array type with this type as the component.


SourceForge.net_Logo