|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.ojrex.FarragoOJRexImplementor net.sf.farrago.ojrex.FarragoOJRexReinterpretImplementor
public class FarragoOJRexReinterpretImplementor
An OJRexImplementor
for reinterpret casts. Reinterpret casts are
important for generated Java code, because while Sql types may share the same
primitive types, they may require different wrappers. Currently this class
can only handle conversions between Decimals and Bigints.
Constructor Summary | |
---|---|
FarragoOJRexReinterpretImplementor()
Constructs an OJRexReinterpretCastImplementor |
Method Summary | |
---|---|
boolean |
canImplement(RexCall call)
Tests whether it is possible to implement a call. |
private void |
checkNullability(FarragoRexToOJTranslator translator,
RelDataType targetType,
RexNode rexValue,
Expression javaValue)
Inserts a null test if a value is nullable, but a target type is not. |
Expression |
implementFarrago(FarragoRexToOJTranslator translator,
RexCall call,
Expression[] operands)
Refined version of OJRexImplementor.implement(org.eigenbase.oj.rex.RexToOJTranslator, org.eigenbase.rex.RexCall, openjava.ptree.Expression[]) . |
Methods inherited from class net.sf.farrago.ojrex.FarragoOJRexImplementor |
---|
implement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FarragoOJRexReinterpretImplementor()
Method Detail |
---|
public boolean canImplement(RexCall call)
OJRexImplementor
canImplement
in interface OJRexImplementor
canImplement
in class FarragoOJRexImplementor
call
- the call for which translation is being considered
public Expression implementFarrago(FarragoRexToOJTranslator translator, RexCall call, Expression[] operands)
FarragoOJRexImplementor
OJRexImplementor.implement(org.eigenbase.oj.rex.RexToOJTranslator, org.eigenbase.rex.RexCall, openjava.ptree.Expression[])
.
implementFarrago
in class FarragoOJRexImplementor
translator
- provides Farrago-specific translation contextcall
- the call to be translatedoperands
- call's operands, which have already been translated
independentlyprivate void checkNullability(FarragoRexToOJTranslator translator, RelDataType targetType, RexNode rexValue, Expression javaValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |