/** Create the log operator for this platform */ private static final ExpressionOperator createLogOperator() { ExpressionOperator result = new ExpressionOperator(); result.setSelector(ExpressionOperator.Log); Vector v = NonSynchronizedVector.newInstance(2); v.addElement("LOG(10,"); v.addElement(")"); result.printsAs(v); result.bePrefix(); result.setNodeClass(FunctionExpression.class); return result; }
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; }