private static final ExpressionOperator createToNumberOperator() {
return ExpressionOperator.simpleFunction(ExpressionOperator.ToNumber, "NUM");
}
private static final ExpressionOperator createNullifOperator() {
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(ExpressionOperator.FunctionOperator);
exOperator.setSelector(ExpressionOperator.NullIf);
Vector v = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(4);
v.addElement(" (CASE WHEN ");
v.addElement(" = ");
v.addElement(" THEN NULL ELSE ");
v.addElement(" END) ");
exOperator.printsAs(v);
exOperator.bePrefix();
int[] indices = {0, 1, 0};
exOperator.setArgumentIndices(indices);
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
}