|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saffron.util.EnumeratedValues.BasicValue
|
+--net.sf.saffron.opt.CallingConvention
CallingConvention enumerates all calling conventions defined
by Saffron itself. This set can be extended by applications by defining
new instances of CallingConvention and registering them with a planner,
along with the desired conversion rules. Extended ordinals must be
greater than CallingConvention.enumeration.getMax().
| Field Summary | |
static CallingConvention |
ARRAY
|
static int |
ARRAY_ORDINAL
The ARRAY calling convention results in a Java expression
which evaluates to an array containing the rows returned. |
static CallingConvention |
COLLECTION
|
static int |
COLLECTION_ORDINAL
The COLLECTION calling convention results in a Java
expression which evaluates to a Collection,
typically a ArrayList. |
static EnumeratedValues |
enumeration
|
static CallingConvention |
ENUMERATION
|
static int |
ENUMERATION_ORDINAL
|
static CallingConvention |
EXISTS
|
static int |
EXISTS_ORDINAL
The EXISTS calling convention is only allowed for a
terminator. |
static CallingConvention |
HASHTABLE
|
static int |
HASHTABLE_ORDINAL
|
static CallingConvention |
ITERABLE
|
static int |
ITERABLE_ORDINAL
The ITERABLE calling convention means that the expression
is converted to an openjava expression (Expression) which evalutes to an object which
implements Iterable. |
static CallingConvention |
ITERATOR
|
static int |
ITERATOR_ORDINAL
The ITERATOR calling convention means that the expression
is converted to an openjava expression (Expression) which evalutes to an Iterator. |
static CallingConvention |
JAVA
|
static int |
JAVA_ORDINAL
The JAVA calling convention means that the expression is
converted into an Openjava parse tree, which can then be un-parsed,
compiled, and executed as java code. |
static CallingConvention |
MAP
|
static int |
MAP_ORDINAL
|
static CallingConvention |
NONE
|
static int |
NONE_ORDINAL
The NONE calling convention means that expression does not
support any calling convention -- in other words, it is not
implementable, and has to be transformed to something else in order to
be implemented. |
static CallingConvention |
RESULT_SET
|
static int |
RESULT_SET_ORDINAL
The RESULT_SET calling convention means that the
expression is a JDBC result set. |
static CallingConvention[] |
values
|
static CallingConvention |
VECTOR
|
static int |
VECTOR_ORDINAL
|
| Fields inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue |
description_, name_, ordinal_ |
| Constructor Summary | |
CallingConvention(String name,
int ordinal)
|
|
| Methods inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue |
equals, getDescription, getName, getOrdinal, toString, unexpected |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int NONE_ORDINAL
NONE calling convention means that expression does not
support any calling convention -- in other words, it is not
implementable, and has to be transformed to something else in order to
be implemented.
public static final CallingConvention NONE
public static final int JAVA_ORDINAL
JAVA calling convention means that the expression is
converted into an Openjava parse tree, which can then be un-parsed,
compiled, and executed as java code.
The SaffronRel.implement(net.sf.saffron.opt.RelImplementor, int) method generates a piece of code which
will call the piece of code corresponding to the parent once for each
row:
RelImplementor.generateParentBody(net.sf.saffron.rel.SaffronRel, openjava.ptree.StatementList), which in turn calls SaffronRel.implement(net.sf.saffron.opt.RelImplementor, int)() on the parent.
RelImplementor.getStatementList()).
public static final CallingConvention JAVA
public static final int ITERATOR_ORDINAL
ITERATOR calling convention means that the expression
is converted to an openjava expression (Expression) which evalutes to an Iterator. See ConverterRel.
public static final CallingConvention ITERATOR
public static final int ARRAY_ORDINAL
ARRAY calling convention results in a Java expression
which evaluates to an array containing the rows returned. Compare
with JAVA_ORDINAL, where a loop does something for
each row returned).
public static final CallingConvention ARRAY
public static final int COLLECTION_ORDINAL
COLLECTION calling convention results in a Java
expression which evaluates to a Collection,
typically a ArrayList.
public static final CallingConvention COLLECTION
public static final int VECTOR_ORDINAL
public static final CallingConvention VECTOR
public static final int ENUMERATION_ORDINAL
public static final CallingConvention ENUMERATION
public static final int MAP_ORDINAL
public static final CallingConvention MAP
public static final int HASHTABLE_ORDINAL
public static final CallingConvention HASHTABLE
public static final int ITERABLE_ORDINAL
ITERABLE calling convention means that the expression
is converted to an openjava expression (Expression) which evalutes to an object which
implements Iterable.
public static final CallingConvention ITERABLE
public static final int EXISTS_ORDINAL
EXISTS calling convention is only allowed for a
terminator.
public static final CallingConvention EXISTS
public static final int RESULT_SET_ORDINAL
RESULT_SET calling convention means that the
expression is a JDBC result set. When a
result set is converted to another convention such as array or
iterator, the default object type is Row.
public static final CallingConvention RESULT_SET
public static final CallingConvention[] values
public static final EnumeratedValues enumeration
| Constructor Detail |
public CallingConvention(String name,
int ordinal)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||