/** Gets the OJ class for a RelDataType */
    private OJClass getClass(RelDataType type) {
      // TODO: is this code any better?
      // OJUtil.typeToOJClass(
      //     rhsType,
      //     translator.getFarragoTypeFactory());

      FarragoTypeFactory factory = translator.getFarragoTypeFactory();
      return OJClass.forClass(factory.getClassForPrimitive(type));
    }
 /** Creates a field access, as in expr.[value] */
 private Expression getValue(RelDataType type, Expression expr) {
   FarragoTypeFactory factory = (FarragoTypeFactory) translator.getTypeFactory();
   return factory.getValueAccessExpression(type, expr);
 }