net.sf.saffron.oj.util
Class JavaRexBuilder

java.lang.Object
  |
  +--net.sf.saffron.rex.RexBuilder
        |
        +--net.sf.saffron.oj.util.JavaRexBuilder

public class JavaRexBuilder
extends RexBuilder

Extends RexBuilder to builds row-expressions including those involving Java code.

Since:
Nov 23, 2003
Version:
$Id: $
Author:
jhyde
See Also:
JavaRowExpression

Nested Class Summary
private static class JavaRexBuilder.OJTranslator
           
 
Field Summary
(package private)  JavaRexBuilder.OJTranslator translator
           
 
Fields inherited from class net.sf.saffron.rex.RexBuilder
operatorTable, typeFactory
 
Constructor Summary
JavaRexBuilder(SaffronTypeFactory typeFactory)
           
 
Method Summary
 RexNode createMethodCall(Environment env, RexNode exp, String methodName, List args)
          Creates a call to a Java method.
 SqlOperator getOperator(RexKind kind)
           
 RexNode makeCase(RexNode rexCond, RexNode rexTrueCase, RexNode rexFalseCase)
           
 RexNode makeCast(SaffronType type, RexNode exp)
           
 RexNode makeFieldAccess(RexNode exp, String fieldName)
           
 RexNode makeJava(Environment env, Expression expr)
           
 RexLiteral makeLiteral(boolean b)
          Creates a boolean literal.
 RexLiteral makeLiteral(double d)
          Creates a double-precision literal.
 RexLiteral makeLiteral(long i)
          Creates an integer literal.
 RexLiteral makeLiteral(String s)
          Creates a varchar literal.
 
Methods inherited from class net.sf.saffron.rex.RexBuilder
constantNull, getOperator, getTypeFactory, makeCall, makeCall, makeCall, makeCall, makeCall, makeCorrel, makeFieldAccess, makeInputRef, makeLiteral, makeLiteral, makeLiteral, makeLiteral, makeRangeReference, makeRangeReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translator

JavaRexBuilder.OJTranslator translator
Constructor Detail

JavaRexBuilder

public JavaRexBuilder(SaffronTypeFactory typeFactory)
Method Detail

makeFieldAccess

public RexNode makeFieldAccess(RexNode exp,
                               String fieldName)
Overrides:
makeFieldAccess in class RexBuilder

createMethodCall

public RexNode createMethodCall(Environment env,
                                RexNode exp,
                                String methodName,
                                List args)
Creates a call to a Java method.

Parameters:
exp - Target of the method
methodName - Name of the method
args - Argument expressions; null means no arguments
Returns:
Method call

makeJava

public RexNode makeJava(Environment env,
                        Expression expr)

makeLiteral

public RexLiteral makeLiteral(boolean b)
Description copied from class: RexBuilder
Creates a boolean literal.

Overrides:
makeLiteral in class RexBuilder

makeLiteral

public RexLiteral makeLiteral(long i)
Description copied from class: RexBuilder
Creates an integer literal.

Overrides:
makeLiteral in class RexBuilder

makeLiteral

public RexLiteral makeLiteral(double d)
Description copied from class: RexBuilder
Creates a double-precision literal.

Overrides:
makeLiteral in class RexBuilder

makeLiteral

public RexLiteral makeLiteral(String s)
Description copied from class: RexBuilder
Creates a varchar literal.

Overrides:
makeLiteral in class RexBuilder

makeCase

public RexNode makeCase(RexNode rexCond,
                        RexNode rexTrueCase,
                        RexNode rexFalseCase)

getOperator

public SqlOperator getOperator(RexKind kind)

makeCast

public RexNode makeCast(SaffronType type,
                        RexNode exp)
Overrides:
makeCast in class RexBuilder

SourceForge.net_Logo