net.sf.saffron.oj.rel
Interface JavaRel

All Known Implementing Classes:
JavaNestedLoopJoinRel, JavaOneRowRel, JavaProjectRel

public interface JavaRel

A relational expression of the Java calling convention.

Objects which implement this interface must (a) extend SaffronRel, and (b) return CallingConvention.JAVA from their SaffronRel.getConvention() method

Since:
Nov 22, 2003$
Version:
$Id: $
Author:
jhyde$

Method Summary
 Expression implementSelf(RelImplementor implementor)
          Returns a Java expression which yields the current row of this relational expression.
 

Method Detail

implementSelf

public Expression implementSelf(RelImplementor implementor)
Returns a Java expression which yields the current row of this relational expression. This method is called by the RelImplementor the first time a piece of Java code wants to refer to this relation. The implementor then uses this expression to initialize a variable.

If no code needs to refer to this relation, then the expression is never generated. This prevents generating useless code like

Dummy_12f614.Ojp_1 oj_var8 = new Dummy_12f614.Ojp_1();
.

If a relational expression has one input relational expression which has the same row type, you may be able to share its variable. Call Implementor#bind(Rel,Rel) to do this.

See Also:
RelImplementor.bind(SaffronRel,SaffronRel)

SourceForge.net_Logo