org.eigenbase.oj.rex
Class OJRexBinaryExpressionImplementor

java.lang.Object
  extended by org.eigenbase.oj.rex.OJRexBinaryExpressionImplementor
All Implemented Interfaces:
OJRexImplementor

public class OJRexBinaryExpressionImplementor
extends Object
implements OJRexImplementor

OJRexBinaryExpressionImplementor implements OJRexImplementor for row expressions which can be translated to instances of OpenJava BinaryExpression.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/oj/rex/OJRexBinaryExpressionImplementor.java#9 $
Author:
John V. Sichi

Field Summary
private  int ojBinaryExpressionOrdinal
           
 
Constructor Summary
OJRexBinaryExpressionImplementor(int ojBinaryExpressionOrdinal)
           
 
Method Summary
 boolean canImplement(RexCall call)
          Tests whether it is possible to implement a call.
 Expression implement(RexToOJTranslator translator, RexCall call, Expression[] operands)
          Implements a single RexCall.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ojBinaryExpressionOrdinal

private final int ojBinaryExpressionOrdinal
Constructor Detail

OJRexBinaryExpressionImplementor

public OJRexBinaryExpressionImplementor(int ojBinaryExpressionOrdinal)
Method Detail

implement

public Expression implement(RexToOJTranslator translator,
                            RexCall call,
                            Expression[] operands)
Description copied from interface: OJRexImplementor
Implements a single RexCall.

Specified by:
implement in interface OJRexImplementor
Parameters:
translator - provides translation context
call - the call to be translated
operands - call's operands, which have already been translated independently

canImplement

public boolean canImplement(RexCall call)
Description copied from interface: OJRexImplementor
Tests whether it is possible to implement a call.

Specified by:
canImplement in interface OJRexImplementor
Parameters:
call - the call for which translation is being considered
Returns:
whether the call can be implemented