Methods Summary |
---|
public static oracle.toplink.essentials.expressions.ExpressionOperator | abs()INTERNAL:
Build operator.
return simpleFunction(Abs, "ABS");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | acos()INTERNAL:
Build operator.
return simpleFunction(Acos, "ACOS");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | addDate()INTERNAL:
Build operator.
ExpressionOperator exOperator = simpleThreeArgumentFunction(AddDate, "DATEADD");
int[] indices = new int[3];
indices[0] = 1;
indices[1] = 2;
indices[2] = 0;
exOperator.setArgumentIndices(indices);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | addMonths()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(AddMonths, "ADD_MONTHS");
|
public static void | addOperator(oracle.toplink.essentials.expressions.ExpressionOperator exOperator)ADVANCED:
Add an operator to the global list of operators.
allOperators.put(new Integer(exOperator.getSelector()), exOperator);
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | all()INTERNAL:
Create the ALL operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(All);
exOperator.printsAs("ALL");
exOperator.bePostfix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | and()INTERNAL:
Create the AND operator.
return simpleLogical(And, "AND", "and");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | any()INTERNAL:
Create the ANY operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Any);
exOperator.printsAs("ANY");
exOperator.bePostfix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public java.lang.Object | applyFunction(java.lang.Object source, java.util.Vector arguments)INTERNAL:
Apply this to an object in memory.
Throw an error if the function is not supported.
if (source instanceof String) {
if (getSelector() == ToUpperCase) {
return ((String)source).toUpperCase();
} else if (getSelector() == ToLowerCase) {
return ((String)source).toLowerCase();
} else if ((getSelector() == Concat) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof String)) {
return ((String)source).concat((String)arguments.elementAt(0));
} else if ((getSelector() == Substring) && (arguments.size() == 2) && (arguments.elementAt(0) instanceof Number) && (arguments.elementAt(1) instanceof Number)) {
// assume the first parameter to be 1-based first index of the substring, the second - substring length.
int beginIndexInclusive = ((Number)arguments.elementAt(0)).intValue() - 1;
int endIndexExclusive = beginIndexInclusive + ((Number)arguments.elementAt(1)).intValue();
return ((String)source).substring(beginIndexInclusive, endIndexExclusive);
} else if (getSelector() == ToNumber) {
return new java.math.BigDecimal((String)source);
} else if (getSelector() == Trim) {
return ((String)source).trim();
} else if (getSelector() == Length) {
return new Integer(((String)source).length());
}
} else if (source instanceof Number) {
if (getSelector() == Ceil) {
return new Double(Math.ceil(((Number)source).doubleValue()));
} else if (getSelector() == Cos) {
return new Double(Math.cos(((Number)source).doubleValue()));
} else if (getSelector() == Abs) {
return new Double(Math.abs(((Number)source).doubleValue()));
} else if (getSelector() == Acos) {
return new Double(Math.acos(((Number)source).doubleValue()));
} else if (getSelector() == Asin) {
return new Double(Math.asin(((Number)source).doubleValue()));
} else if (getSelector() == Atan) {
return new Double(Math.atan(((Number)source).doubleValue()));
} else if (getSelector() == Exp) {
return new Double(Math.exp(((Number)source).doubleValue()));
} else if (getSelector() == Sqrt) {
return new Double(Math.sqrt(((Number)source).doubleValue()));
} else if (getSelector() == Floor) {
return new Double(Math.floor(((Number)source).doubleValue()));
} else if (getSelector() == Log) {
return new Double(Math.log(((Number)source).doubleValue()));
} else if ((getSelector() == Power) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(Math.pow(((Number)source).doubleValue(), (((Number)arguments.elementAt(0)).doubleValue())));
} else if (getSelector() == Round) {
return new Double(Math.round(((Number)source).doubleValue()));
} else if (getSelector() == Sin) {
return new Double(Math.sin(((Number)source).doubleValue()));
} else if (getSelector() == Tan) {
return new Double(Math.tan(((Number)source).doubleValue()));
} else if ((getSelector() == Greatest) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(Math.max(((Number)source).doubleValue(), (((Number)arguments.elementAt(0)).doubleValue())));
} else if ((getSelector() == Least) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(Math.min(((Number)source).doubleValue(), (((Number)arguments.elementAt(0)).doubleValue())));
} else if ((getSelector() == Add) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(((Number)source).doubleValue() + (((Number)arguments.elementAt(0)).doubleValue()));
} else if ((getSelector() == Subtract) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(((Number)source).doubleValue() - (((Number)arguments.elementAt(0)).doubleValue()));
} else if ((getSelector() == Divide) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(((Number)source).doubleValue() / (((Number)arguments.elementAt(0)).doubleValue()));
} else if ((getSelector() == Multiply) && (arguments.size() == 1) && (arguments.elementAt(0) instanceof Number)) {
return new Double(((Number)source).doubleValue() * (((Number)arguments.elementAt(0)).doubleValue()));
}
}
throw QueryException.cannotConformExpression();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ascending()INTERNAL:
Create the ASCENDING operator.
return simpleOrdering(Ascending, "ASC", "ascending");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ascii()INTERNAL:
Build operator.
return simpleFunction(Ascii, "ASCII");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | asin()INTERNAL:
Build operator.
return simpleFunction(Asin, "ASIN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | atan()INTERNAL:
Build operator.
return simpleFunction(Atan, "ATAN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | average()INTERNAL:
Create the AVERAGE operator.
return simpleAggregate(Average, "AVG", "average");
|
public void | bePostfix()ADVANCED:
Tell the operator to be postfix, i.e. its strings start printing after
those of its first argument.
isPrefix = false;
|
public void | bePrefix()ADVANCED:
Tell the operator to be pretfix, i.e. its strings start printing before
those of its first argument.
isPrefix = true;
|
public void | beRepeating()INTERNAL:
Make this a repeating argument. Currently unused.
isRepeating = true;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | between()INTERNAL:
Create the BETWEEN Operator
ExpressionOperator result = new ExpressionOperator();
result.setSelector(Between);
result.setType(ComparisonOperator);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("(");
v.addElement(" BETWEEN ");
v.addElement(" AND ");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | caseStatement()INTERNAL:
Build operator.
Note: This operator works differently from other operators.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Case);
exOperator.bePrefix();
exOperator.setNodeClass(FunctionExpression.class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ceil()INTERNAL:
Build operator.
return simpleFunction(Ceil, "CEIL");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | charIndex()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(CharIndex, "CHARINDEX");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | charLength()INTERNAL:
Build operator.
return simpleFunction(CharLength, "CHAR_LENGTH");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | chr()INTERNAL:
Build operator.
return simpleFunction(Chr, "CHR");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | concat()INTERNAL:
Build operator.
return simpleMath(Concat, "+");
|
public boolean | conformBetween(java.lang.Object left, java.lang.Object right)INTERNAL:
Compare bewteen in memory.
Object start = ((Vector)right).elementAt(0);
Object end = ((Vector)right).elementAt(1);
if ((left == null) || (start == null) || (end == null)) {
return false;
}
if ((left instanceof Number) && (start instanceof Number) && (end instanceof Number)) {
return ((((Number)left).doubleValue()) >= (((Number)start).doubleValue())) && ((((Number)left).doubleValue()) <= (((Number)end).doubleValue()));
} else if ((left instanceof String) && (start instanceof String) && (end instanceof String)) {
return ((((String)left).compareTo(((String)start)) > 0) || (((String)left).compareTo(((String)start)) == 0)) && ((((String)left).compareTo(((String)end)) < 0) || (((String)left).compareTo(((String)end)) == 0));
} else if ((left instanceof java.util.Date) && (start instanceof java.util.Date) && (end instanceof java.util.Date)) {
return (((java.util.Date)left).after(((java.util.Date)start)) || ((java.util.Date)left).equals(((java.util.Date)start))) && (((java.util.Date)left).before(((java.util.Date)end)) || ((java.util.Date)left).equals(((java.util.Date)end)));
}
throw QueryException.cannotConformExpression();
|
public boolean | conformLike(java.lang.Object left, java.lang.Object right)INTERNAL:
Compare like in memory.
This only works for % not _.
if ((right == null) && (left == null)) {
return true;
}
if (!(right instanceof String) || !(left instanceof String)) {
throw QueryException.cannotConformExpression();
}
String likeString = (String)right;
if (likeString.indexOf("_") != -1) {
throw QueryException.cannotConformExpression();
}
String value = (String)left;
if (likeString.indexOf("%") == -1) {
// No % symbols
return left.equals(right);
}
boolean strictStart = !likeString.startsWith("%");
boolean strictEnd = !likeString.endsWith("%");
StringTokenizer tokens = new StringTokenizer(likeString, "%");
int lastPosition = 0;
String lastToken = null;
if (strictStart) {
lastToken = tokens.nextToken();
if (!value.startsWith(lastToken)) {
return false;
}
}
while (tokens.hasMoreTokens()) {
lastToken = tokens.nextToken();
lastPosition = value.indexOf(lastToken, lastPosition);
if (lastPosition < 0) {
return false;
}
}
if (strictEnd) {
return value.endsWith(lastToken);
}
return true;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | cos()INTERNAL:
Build operator.
return simpleFunction(Cos, "COS");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | cosh()INTERNAL:
Build operator.
return simpleFunction(Cosh, "COSH");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | cot()INTERNAL:
Build operator.
return simpleFunction(Cot, "COT");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | count()INTERNAL:
Create the COUNT operator.
return simpleAggregate(Count, "COUNT", "count");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | currentDate()INTERNAL:
Build operator.
return simpleFunctionNoParentheses(CurrentDate, "CURRENT_DATE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | currentTime()INTERNAL:
Build operator.
return simpleFunctionNoParentheses(CurrentTime, "CURRENT_TIME");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | currentTimeStamp()INTERNAL:
Build operator.
return simpleFunctionNoParentheses(Today, "CURRENT_TIMESTAMP");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | dateDifference()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(DateDifference, "DATEDIFF");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | dateName()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(DateName, "DATENAME");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | datePart()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(DatePart, "DATEPART");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | dateToString()INTERNAL:
Build operator.
return simpleFunction(DateToString, "TO_CHAR");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | decode()INTERNAL:
Build operator.
Note: This operator works differently from other operators.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setSelector(Decode);
exOperator.setNodeClass(FunctionExpression.class);
exOperator.setType(FunctionOperator);
exOperator.bePrefix();
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | deref()INTERNAL:
Build operator.
return simpleFunction(Deref, "DEREF");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | descending()INTERNAL:
Create the DESCENDING operator.
return simpleOrdering(Descending, "DESC", "descending");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | difference()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Difference, "DIFFERENCE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | distinct()INTERNAL:
Create the DISTINCT operator.
return simpleFunction(Distinct, "DISTINCT", "distinct");
|
public boolean | doesRelationConform(java.lang.Object left, java.lang.Object right)INTERNAL:
Compare the values in memory.
Used for in-memory querying, all operators are not support.
// Big case statement follows.
// Note, compareTo for String returns a number <= -1 if the String is less than. We assumed that
// it would return -1. The same thing for strings that are greater than (ie it returns >= 1). PWK
// Equals
if (getSelector() == Equal) {
if ((left == null) && (right == null)) {
return true;
} else if ((left == null) || (right == null)) {
return false;
}
if (((left instanceof Number) && (right instanceof Number)) && (left.getClass() != right.getClass())) {
return ((Number)left).doubleValue() == ((Number)right).doubleValue();
}
return left.equals(right);
} else if (getSelector() == NotEqual) {
if ((left == null) && (right == null)) {
return false;
} else if ((left == null) || (right == null)) {
return true;
}
return !left.equals(right);
} else if (getSelector() == IsNull) {
return (left == null);
}
if (getSelector() == NotNull) {
return (left != null);
}
// Less thans, greater thans
else if (getSelector() == LessThan) {// You have gottan love polymorphism in Java, NOT!!!
if ((left == null) || (right == null)) {
return false;
}
if ((left instanceof Number) && (right instanceof Number)) {
return (((Number)left).doubleValue()) < (((Number)right).doubleValue());
} else if ((left instanceof String) && (right instanceof String)) {
return ((String)left).compareTo(((String)right)) < 0;
} else if ((left instanceof java.util.Date) && (right instanceof java.util.Date)) {
return ((java.util.Date)left).before(((java.util.Date)right));
}
} else if (getSelector() == LessThanEqual) {
if ((left == null) && (right == null)) {
return true;
} else if ((left == null) || (right == null)) {
return false;
}
if ((left instanceof Number) && (right instanceof Number)) {
return (((Number)left).doubleValue()) <= (((Number)right).doubleValue());
} else if ((left instanceof String) && (right instanceof String)) {
int compareValue = ((String)left).compareTo(((String)right));
return (compareValue < 0) || (compareValue == 0);
} else if ((left instanceof java.util.Date) && (right instanceof java.util.Date)) {
return ((java.util.Date)left).equals(((java.util.Date)right)) || ((java.util.Date)left).before(((java.util.Date)right));
}
} else if (getSelector() == GreaterThan) {
if ((left == null) || (right == null)) {
return false;
}
if ((left instanceof Number) && (right instanceof Number)) {
return (((Number)left).doubleValue()) > (((Number)right).doubleValue());
} else if ((left instanceof String) && (right instanceof String)) {
int compareValue = ((String)left).compareTo(((String)right));
return (compareValue > 0);
} else if ((left instanceof java.util.Date) && (right instanceof java.util.Date)) {
return ((java.util.Date)left).after(((java.util.Date)right));
}
} else if (getSelector() == GreaterThanEqual) {
if ((left == null) && (right == null)) {
return true;
} else if ((left == null) || (right == null)) {
return false;
}
if ((left instanceof Number) && (right instanceof Number)) {
return (((Number)left).doubleValue()) >= (((Number)right).doubleValue());
} else if ((left instanceof String) && (right instanceof String)) {
int compareValue = ((String)left).compareTo(((String)right));
return (compareValue > 0) || (compareValue == 0);
} else if ((left instanceof java.util.Date) && (right instanceof java.util.Date)) {
return ((java.util.Date)left).equals(((java.util.Date)right)) || ((java.util.Date)left).after(((java.util.Date)right));
}
}
// Between
else if ((getSelector() == Between) && (right instanceof Vector) && (((Vector)right).size() == 2)) {
return conformBetween(left, right);
} else if ((getSelector() == NotBetween) && (right instanceof Vector) && (((Vector)right).size() == 2)) {
return !conformBetween(left, right);
}
// In
else if ((getSelector() == In) && (right instanceof Vector)) {
return ((Vector)right).contains(left);
} else if ((getSelector() == NotIn) && (right instanceof Vector)) {
return !((Vector)right).contains(left);
}
// Like
//conformLike(left, right);
else if ((getSelector() == Like) || (getSelector() == NotLike)) {
// the regular expression framework we use to conform like is only supported in
// JDK 1.4 and later. We will ask our JavaPlatform to do this for us.
int doesLikeConform = JavaPlatform.conformLike(left, right);
if (doesLikeConform == JavaPlatform.TRUE) {
return getSelector() == Like;// Negate for NotLike
} else if (doesLikeConform == JavaPlatform.FALSE) {
return getSelector() != Like;// Negate for NotLike
}
}
throw QueryException.cannotConformExpression();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | equalOuterJoin()INTERNAL:
Initialize the outer join operator
Note: This is merely a shell which is incomplete, and
so will be replaced by the platform's operator when we
go to print. We need to create this here so that the expression
class is correct, normally it assumes functions for unknown operators.
return simpleRelation(EqualOuterJoin, "=*");
|
public boolean | equals(java.lang.Object object)PUBLIC:
Test for equality
if (!(object instanceof ExpressionOperator)) {
return false;
}
return getSelector() == ((ExpressionOperator)object).getSelector();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | exists()INTERNAL:
Create the EXISTS operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Exists);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("EXISTS" + " ");
v.addElement(" ");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | existsNode()INTERNAL:
Create the existsNode expression operator
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("existsNode(");
v.addElement(",");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.setSelector(ExistsNode);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | exp()INTERNAL:
Build operator.
return simpleFunction(Exp, "EXP");
|
public oracle.toplink.essentials.expressions.Expression | expressionFor(oracle.toplink.essentials.expressions.Expression base)INTERNAL:
Create an expression for this operator, using the given base.
return expressionForArguments(base, oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(0));
|
public oracle.toplink.essentials.expressions.Expression | expressionFor(oracle.toplink.essentials.expressions.Expression base, java.lang.Object value)INTERNAL:
Create an expression for this operator, using the given base and a single argument.
return newExpressionForArgument(base, value);
|
public oracle.toplink.essentials.expressions.Expression | expressionForArguments(oracle.toplink.essentials.expressions.Expression base, java.util.Vector arguments)INTERNAL:
Create an expression for this operator, using the given base and arguments.
return newExpressionForArguments(base, arguments);
|
public oracle.toplink.essentials.expressions.Expression | expressionForWithBaseLast(oracle.toplink.essentials.expressions.Expression base, java.lang.Object value)INTERNAL:
Create an expression for this operator, using the given base and a single argument.
Base is used last in the expression
return newExpressionForArgumentWithBaseLast(base, value);
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | extract()INTERNAL:
Create the extract expression operator
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("extract(");
v.addElement(",");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.setSelector(Extract);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | extractValue()INTERNAL:
Create the extractValue expression operator
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("extractValue(");
v.addElement(",");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.setSelector(ExtractValue);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | floor()INTERNAL:
Build operator.
return simpleFunction(Floor, "FLOOR");
|
public static synchronized java.util.Hashtable | getAllOperators()ADVANCED:
Return the hashtable of all operators.
if (allOperators == null) {
initializeOperators();
}
return allOperators;
|
public java.lang.String[] | getDatabaseStrings()INTERNAL:
return databaseStrings;
|
public java.lang.String[] | getJavaStrings()INTERNAL:
return javaStrings;
|
public java.lang.Class | getNodeClass()INTERNAL:
return nodeClass;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | getNumberVal()
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement(".getNumberVal()");
result.printsAs(v);
result.bePostfix();
result.setSelector(GetNumberVal);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | getOperator(java.lang.Integer selector)INTERNAL:
Lookup the operator with the given name.
return (ExpressionOperator)getAllOperators().get(selector);
|
public static java.lang.String | getPlatformOperatorName(int operator)INTERNAL:
Initialize a mapping to the platform operator names for usage with exceptions.
String name = (String)getPlatformOperatorNames().get(new Integer(operator));
if (name == null) {
name = String.valueOf(operator);
}
return name;
|
public static synchronized java.util.Hashtable | getPlatformOperatorNames()INTERNAL:
Initialize a mapping to the platform operator names for usage with exceptions.
if (platformOperatorNames == null) {
platformOperatorNames = new Hashtable();
platformOperatorNames.put(new Integer(ToUpperCase), "ToUpperCase");
platformOperatorNames.put(new Integer(ToLowerCase), "ToLowerCase");
platformOperatorNames.put(new Integer(Chr), "Chr");
platformOperatorNames.put(new Integer(Concat), "Concat");
platformOperatorNames.put(new Integer(HexToRaw), "HexToRaw");
platformOperatorNames.put(new Integer(Initcap), "Initcap");
platformOperatorNames.put(new Integer(Instring), "Instring");
platformOperatorNames.put(new Integer(Soundex), "Soundex");
platformOperatorNames.put(new Integer(LeftPad), "LeftPad");
platformOperatorNames.put(new Integer(LeftTrim), "LeftTrim");
platformOperatorNames.put(new Integer(RightPad), "RightPad");
platformOperatorNames.put(new Integer(RightTrim), "RightTrim");
platformOperatorNames.put(new Integer(Substring), "Substring");
platformOperatorNames.put(new Integer(Translate), "Translate");
platformOperatorNames.put(new Integer(Ascii), "Ascii");
platformOperatorNames.put(new Integer(Length), "Length");
platformOperatorNames.put(new Integer(CharIndex), "CharIndex");
platformOperatorNames.put(new Integer(CharLength), "CharLength");
platformOperatorNames.put(new Integer(Difference), "Difference");
platformOperatorNames.put(new Integer(Reverse), "Reverse");
platformOperatorNames.put(new Integer(Replicate), "Replicate");
platformOperatorNames.put(new Integer(Right), "Right");
platformOperatorNames.put(new Integer(Locate), "Locate");
platformOperatorNames.put(new Integer(Locate2), "Locate");
platformOperatorNames.put(new Integer(ToNumber), "ToNumber");
platformOperatorNames.put(new Integer(ToChar), "ToChar");
platformOperatorNames.put(new Integer(ToCharWithFormat), "ToChar");
platformOperatorNames.put(new Integer(AddMonths), "AddMonths");
platformOperatorNames.put(new Integer(DateToString), "DateToString");
platformOperatorNames.put(new Integer(MonthsBetween), "MonthsBetween");
platformOperatorNames.put(new Integer(NextDay), "NextDay");
platformOperatorNames.put(new Integer(RoundDate), "RoundDate");
platformOperatorNames.put(new Integer(AddDate), "AddDate");
platformOperatorNames.put(new Integer(DateName), "DateName");
platformOperatorNames.put(new Integer(DatePart), "DatePart");
platformOperatorNames.put(new Integer(DateDifference), "DateDifference");
platformOperatorNames.put(new Integer(TruncateDate), "TruncateDate");
platformOperatorNames.put(new Integer(NewTime), "NewTime");
platformOperatorNames.put(new Integer(Nvl), "Nvl");
platformOperatorNames.put(new Integer(NewTime), "NewTime");
platformOperatorNames.put(new Integer(Ceil), "Ceil");
platformOperatorNames.put(new Integer(Cos), "Cos");
platformOperatorNames.put(new Integer(Cosh), "Cosh");
platformOperatorNames.put(new Integer(Abs), "Abs");
platformOperatorNames.put(new Integer(Acos), "Acos");
platformOperatorNames.put(new Integer(Asin), "Asin");
platformOperatorNames.put(new Integer(Atan), "Atan");
platformOperatorNames.put(new Integer(Exp), "Exp");
platformOperatorNames.put(new Integer(Sqrt), "Sqrt");
platformOperatorNames.put(new Integer(Floor), "Floor");
platformOperatorNames.put(new Integer(Ln), "Ln");
platformOperatorNames.put(new Integer(Log), "Log");
platformOperatorNames.put(new Integer(Mod), "Mod");
platformOperatorNames.put(new Integer(Power), "Power");
platformOperatorNames.put(new Integer(Round), "Round");
platformOperatorNames.put(new Integer(Sign), "Sign");
platformOperatorNames.put(new Integer(Sin), "Sin");
platformOperatorNames.put(new Integer(Sinh), "Sinh");
platformOperatorNames.put(new Integer(Tan), "Tan");
platformOperatorNames.put(new Integer(Tanh), "Tanh");
platformOperatorNames.put(new Integer(Trunc), "Trunc");
platformOperatorNames.put(new Integer(Greatest), "Greatest");
platformOperatorNames.put(new Integer(Least), "Least");
platformOperatorNames.put(new Integer(Add), "Add");
platformOperatorNames.put(new Integer(Subtract), "Subtract");
platformOperatorNames.put(new Integer(Divide), "Divide");
platformOperatorNames.put(new Integer(Multiply), "Multiply");
platformOperatorNames.put(new Integer(Atan2), "Atan2");
platformOperatorNames.put(new Integer(Cot), "Cot");
platformOperatorNames.put(new Integer(Deref), "Deref");
platformOperatorNames.put(new Integer(Ref), "Ref");
platformOperatorNames.put(new Integer(RefToHex), "RefToHex");
platformOperatorNames.put(new Integer(Value), "Value");
platformOperatorNames.put(new Integer(Extract), "Extract");
platformOperatorNames.put(new Integer(ExtractValue), "ExtractValue");
platformOperatorNames.put(new Integer(ExistsNode), "ExistsNode");
platformOperatorNames.put(new Integer(GetStringVal), "GetStringVal");
platformOperatorNames.put(new Integer(GetNumberVal), "GetNumberVal");
platformOperatorNames.put(new Integer(IsFragment), "IsFragment");
}
return platformOperatorNames;
|
public int | getSelector()INTERNAL:
Return the selector id.
return selector;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | getStringVal()
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement(".getStringVal()");
result.printsAs(v);
result.bePostfix();
result.setSelector(GetStringVal);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public int | getType()ADVANCED:
Return the type of function.
This must be one of the static function types defined in this class.
return this.type;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | greatest()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Greatest, "GREATEST");
|
public int | hashCode()PUBLIC:
Return the hash-code based on the unique selector.
return getSelector();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | hexToRaw()INTERNAL:
Build operator.
return simpleFunction(HexToRaw, "HEXTORAW");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ifNull()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Nvl, "NVL");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | in()INTERNAL:
Create the IN operator.
ExpressionOperator result = new ExpressionOperator();
result.setType(ExpressionOperator.FunctionOperator);
result.setSelector(In);
Vector v = new Vector(2);
v.addElement(" IN (");
v.addElement(")");
result.printsAs(v);
result.bePostfix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | inSubQuery()INTERNAL:
Create the IN operator taking a subquery.
Note, the subquery itself comes with parenethesis, so the IN operator
should not add any parenethesis.
ExpressionOperator result = new ExpressionOperator();
result.setType(ExpressionOperator.FunctionOperator);
result.setSelector(InSubQuery);
Vector v = new Vector(1);
v.addElement(" IN ");
result.printsAs(v);
result.bePostfix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | initcap()INTERNAL:
Build operator.
return simpleFunction(Initcap, "INITCAP");
|
protected static void | initializeAggregateFunctionOperators()INTERNAL:
addOperator(count());
addOperator(sum());
addOperator(average());
addOperator(minimum());
addOperator(maximum());
addOperator(variance());
addOperator(standardDeviation());
addOperator(distinct());
|
protected static void | initializeFunctionOperators()INTERNAL:
addOperator(notOperator());
addOperator(ascending());
addOperator(descending());
addOperator(any());
addOperator(some());
addOperator(all());
addOperator(in());
addOperator(inSubQuery());
addOperator(notIn());
addOperator(notInSubQuery());
|
protected static void | initializeLogicalOperators()INTERNAL:
addOperator(and());
addOperator(or());
addOperator(isNull());
addOperator(notNull());
|
public static java.util.Hashtable | initializeOperators()INTERNAL:
resetOperators();
initializeFunctionOperators();
initializeRelationOperators();
initializeLogicalOperators();
initializeAggregateFunctionOperators();
return allOperators;
|
protected static void | initializeRelationOperators()INTERNAL:
addOperator(simpleRelation(Equal, "=", "equal"));
addOperator(simpleRelation(NotEqual, "<>", "notEqual"));
addOperator(simpleRelation(LessThan, "<", "lessThan"));
addOperator(simpleRelation(LessThanEqual, "<=", "lessThanEqual"));
addOperator(simpleRelation(GreaterThan, ">", "greaterThan"));
addOperator(simpleRelation(GreaterThanEqual, ">=", "greaterThanEqual"));
addOperator(like());
addOperator(likeEscape());
addOperator(notLike());
addOperator(between());
addOperator(exists());
addOperator(notExists());
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | instring()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Instring, "INSTR");
|
public boolean | isAggregateOperator()Aggregate functions are function in the select such as COUNT.
return getType() == AggregateOperator;
|
public boolean | isAll()INTERNAL:
Indicates whether operator has selector All
return selector == ExpressionOperator.All;
|
public boolean | isAny()INTERNAL:
Indicates whether operator has selector Any or Some
return selector == ExpressionOperator.Any ||
selector == ExpressionOperator.Some;
|
public boolean | isAnyOrAll()INTERNAL:
Indicates whether operator has selector Any, Some or All
return isAny() || isAll();
|
public boolean | isComparisonOperator()Comparison functions are functions such as = and >.
return getType() == ComparisonOperator;
|
public boolean | isComplete()INTERNAL:
If we have all the required information, this operator is complete
and can be used as is. Otherwise we will need to look up a platform-
specific operator.
return (databaseStrings != null) && (databaseStrings.length != 0);
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | isFragment()
ExpressionOperator result = new ExpressionOperator();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement(".isFragment()");
result.printsAs(v);
result.bePostfix();
result.setSelector(IsFragment);
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public boolean | isFunctionOperator()General functions are any normal function such as UPPER.
return getType() == FunctionOperator;
|
public boolean | isLogicalOperator()Logical functions are functions such as and and or.
return getType() == LogicalOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | isNull()INTERNAL:
Create the ISNULL operator.
ExpressionOperator result = new ExpressionOperator();
result.setType(ComparisonOperator);
result.setSelector(IsNull);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("(");
v.addElement(" IS NULL)");
result.printsAs(v);
result.bePrefix();
result.printsJavaAs(".isNull()");
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public boolean | isOrderOperator()Order functions are used in the order by such as ASC.
return getType() == OrderOperator;
|
public boolean | isPrefix()ADVANCED:
Return true if this is a prefix operator.
return isPrefix;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | lastDay()INTERNAL:
Build operator.
return simpleFunction(LastDay, "LAST_DAY");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | least()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Least, "LEAST");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | leftPad()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(LeftPad, "LPAD");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | leftTrim()INTERNAL:
Build operator.
return simpleFunction(LeftTrim, "LTRIM");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | leftTrim2()INTERNAL:
Build leftTrim operator that takes one parameter.
return simpleTwoArgumentFunction(LeftTrim2, "LTRIM");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | length()INTERNAL:
Build operator.
return simpleFunction(Length, "LENGTH");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | like()INTERNAL:
Create the LIKE operator.
return simpleRelation(Like, "LIKE", "like");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | likeEscape()INTERNAL:
Create the LIKE operator.
ExpressionOperator result = new ExpressionOperator();
result.setSelector(LikeEscape);
result.setType(ComparisonOperator);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("(");
v.addElement(" LIKE ");
v.addElement(" ESCAPE ");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ln()INTERNAL:
Build operator.
return simpleFunction(Ln, "LN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | locate()INTERNAL:
Build locate operator i.e. LOCATE("ob", t0.F_NAME)
ExpressionOperator expOperator = simpleTwoArgumentFunction(Locate, "LOCATE");
int[] argumentIndices = new int[2];
argumentIndices[0] = 1;
argumentIndices[1] = 0;
expOperator.setArgumentIndices(argumentIndices);
return expOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | locate2()INTERNAL:
Build locate operator with 3 params i.e. LOCATE("coffee", t0.DESCRIP, 4).
Last parameter is a start at.
ExpressionOperator expOperator = simpleThreeArgumentFunction(Locate2, "LOCATE");
int[] argumentIndices = new int[3];
argumentIndices[0] = 1;
argumentIndices[1] = 0;
argumentIndices[2] = 2;
expOperator.setArgumentIndices(argumentIndices);
return expOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | log()INTERNAL:
Build operator.
return simpleFunction(Log, "LOG");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | maximum()INTERNAL:
Create the MAXIMUM operator.
return simpleAggregate(Maximum, "MAX", "maximum");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | minimum()INTERNAL:
Create the MINIMUM operator.
return simpleAggregate(Minimum, "MIN", "minimum");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | mod()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Mod, "MOD");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | monthsBetween()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(MonthsBetween, "MONTHS_BETWEEN");
|
public oracle.toplink.essentials.expressions.Expression | newExpressionForArgument(oracle.toplink.essentials.expressions.Expression base, java.lang.Object singleArgument)INTERNAL:
Create a new expression. Optimized for the single argument case.
if (representsEqualToNull(singleArgument)) {
return base.isNull();
}
if (representsNotEqualToNull(singleArgument)) {
return base.notNull();
}
try {
Expression exp = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
exp = (Expression)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(getNodeClass()));
} catch (PrivilegedActionException exception) {
return null;
}
} else {
exp = (Expression)PrivilegedAccessHelper.newInstanceFromClass(getNodeClass());
}
exp.create(base, singleArgument, this);
return exp;
} catch (InstantiationException e) {
return null;
} catch (IllegalAccessException f) {
return null;
}
|
public oracle.toplink.essentials.expressions.Expression | newExpressionForArgumentWithBaseLast(oracle.toplink.essentials.expressions.Expression base, java.lang.Object singleArgument)INTERNAL:
Create a new expression. Optimized for the single argument case with base last
if (representsEqualToNull(singleArgument)) {
return base.isNull();
}
if (representsNotEqualToNull(singleArgument)) {
return base.notNull();
}
try {
Expression exp = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
exp = (Expression)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(getNodeClass()));
} catch (PrivilegedActionException exception) {
return null;
}
} else {
exp = (Expression)PrivilegedAccessHelper.newInstanceFromClass(getNodeClass());
}
exp.createWithBaseLast(base, singleArgument, this);
return exp;
} catch (InstantiationException e) {
return null;
} catch (IllegalAccessException f) {
return null;
}
|
public oracle.toplink.essentials.expressions.Expression | newExpressionForArguments(oracle.toplink.essentials.expressions.Expression base, java.util.Vector arguments)INTERNAL:
The general case.
if (representsEqualToNull(arguments)) {
return base.isNull();
}
if (representsNotEqualToNull(arguments)) {
return base.notNull();
}
try {
Expression exp = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
exp = (Expression)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(getNodeClass()));
} catch (PrivilegedActionException exception) {
return null;
}
} else {
exp = (Expression)PrivilegedAccessHelper.newInstanceFromClass(getNodeClass());
}
exp.create(base, arguments, this);
return exp;
} catch (InstantiationException e) {
return null;
} catch (IllegalAccessException f) {
return null;
}
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | newTime()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(NewTime, "NEW_TIME");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | nextDay()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(NextDay, "NEXT_DAY");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notExists()INTERNAL:
Create the NOT EXISTS operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(NotExists);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("NOT EXISTS" + " ");
v.addElement(" ");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notIn()INTERNAL:
Create the NOTIN operator.
ExpressionOperator result = new ExpressionOperator();
result.setType(ExpressionOperator.FunctionOperator);
result.setSelector(NotIn);
Vector v = new Vector(2);
v.addElement(" NOT IN (");
v.addElement(")");
result.printsAs(v);
result.bePostfix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notInSubQuery()INTERNAL:
Create the NOTIN operator taking a subQuery.
Note, the subquery itself comes with parenethesis, so the IN operator
should not add any parenethesis.
ExpressionOperator result = new ExpressionOperator();
result.setType(ExpressionOperator.FunctionOperator);
result.setSelector(NotInSubQuery);
Vector v = new Vector(1);
v.addElement(" NOT IN ");
result.printsAs(v);
result.bePostfix();
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notLike()INTERNAL:
Create the NOTLIKE operator.
return simpleRelation(NotLike, "NOT LIKE", "notLike");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notNull()INTERNAL:
Create the NOTNULL operator.
ExpressionOperator result = new ExpressionOperator();
result.setType(ComparisonOperator);
result.setSelector(NotNull);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("(");
v.addElement(" IS NOT NULL)");
result.printsAs(v);
result.bePrefix();
result.printsJavaAs(".notNull()");
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | notOperator()INTERNAL:
Create the NOT operator.
ExpressionOperator result = new ExpressionOperator();
result.setSelector(Not);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance();
v.addElement("NOT (");
v.addElement(")");
result.printsAs(v);
result.bePrefix();
result.printsJavaAs(".not()");
result.setNodeClass(ClassConstants.FunctionExpression_Class);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | or()INTERNAL:
Create the OR operator.
return simpleLogical(Or, "OR", "or");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | oracleDateName()INTERNAL:
Oracle equivalent to DATENAME is TO_CHAR.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(DateName);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);
v.addElement("TO_CHAR(");
v.addElement(", '");
v.addElement("')");
exOperator.printsAs(v);
exOperator.bePrefix();
int[] indices = { 1, 0 };
exOperator.setArgumentIndices(indices);
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | power()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Power, "POWER");
|
public void | printCollection(java.util.Vector items, oracle.toplink.essentials.internal.expressions.ExpressionSQLPrinter printer)INTERNAL: Print the collection onto the SQL stream.
int dbStringIndex = 0;
try {
if (isPrefix()) {
printer.getWriter().write(getDatabaseStrings()[0]);
dbStringIndex = 1;
} else {
dbStringIndex = 0;
}
} catch (IOException e) {
e.printStackTrace();
}
for (int i = 0; i < items.size(); i++) {
int index = 0;
if (argumentIndices == null) {
index = i;
} else {
index = argumentIndices[i];
}
;
Expression item = (Expression)items.elementAt(index);
if ((getSelector() == Ref) || ((getSelector() == Deref) && (item.isObjectExpression()))) {
DatabaseTable alias = ((ObjectExpression)item).aliasForTable((DatabaseTable)((ObjectExpression)item).getDescriptor().getTables().firstElement());
printer.printString(alias.getName());
} else if ((getSelector() == Count) && (item.isExpressionBuilder())) {
printer.printString("*");
} else if (getType() == FunctionOperator) {
item.printSQLWithoutConversion(printer);
} else {
item.printSQL(printer);
}
if (dbStringIndex < getDatabaseStrings().length) {
printer.printString(getDatabaseStrings()[dbStringIndex++]);
}
}
|
public void | printDuo(oracle.toplink.essentials.expressions.Expression first, oracle.toplink.essentials.expressions.Expression second, oracle.toplink.essentials.internal.expressions.ExpressionSQLPrinter printer)INTERNAL:
For performance, special case printing two children, since it's by far the most common
int dbStringIndex;
if (isPrefix()) {
printer.printString(getDatabaseStrings()[0]);
dbStringIndex = 1;
} else {
dbStringIndex = 0;
}
first.printSQL(printer);
if (dbStringIndex < getDatabaseStrings().length) {
printer.printString(getDatabaseStrings()[dbStringIndex++]);
}
if (second != null) {
second.printSQL(printer);
if (dbStringIndex < getDatabaseStrings().length) {
printer.printString(getDatabaseStrings()[dbStringIndex++]);
}
}
|
public void | printJavaCollection(java.util.Vector items, oracle.toplink.essentials.internal.expressions.ExpressionJavaPrinter printer)INTERNAL: Print the collection onto the SQL stream.
int javaStringIndex = 0;
for (int i = 0; i < items.size(); i++) {
Expression item = (Expression)items.elementAt(i);
item.printJava(printer);
if (javaStringIndex < getJavaStrings().length) {
printer.printString(getJavaStrings()[javaStringIndex++]);
}
}
|
public void | printJavaDuo(oracle.toplink.essentials.expressions.Expression first, oracle.toplink.essentials.expressions.Expression second, oracle.toplink.essentials.internal.expressions.ExpressionJavaPrinter printer)INTERNAL:
For performance, special case printing two children, since it's by far the most common
int javaStringIndex = 0;
first.printJava(printer);
if (javaStringIndex < getJavaStrings().length) {
printer.printString(getJavaStrings()[javaStringIndex++]);
}
if (second != null) {
second.printJava(printer);
if (javaStringIndex < getJavaStrings().length) {
printer.printString(getJavaStrings()[javaStringIndex]);
}
}
|
public void | printsAs(java.lang.String s)ADVANCED:
Set the single string for this operator.
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1);
v.addElement(s);
printsAs(v);
|
public void | printsAs(java.util.Vector dbStrings)ADVANCED:
Set the strings for this operator.
this.databaseStrings = new String[dbStrings.size()];
for (int i = 0; i < dbStrings.size(); i++) {
getDatabaseStrings()[i] = (String)dbStrings.elementAt(i);
}
|
public void | printsJavaAs(java.lang.String s)ADVANCED:
Set the single string for this operator.
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1);
v.addElement(s);
printsJavaAs(v);
|
public void | printsJavaAs(java.util.Vector dbStrings)ADVANCED:
Set the strings for this operator.
this.javaStrings = new String[dbStrings.size()];
for (int i = 0; i < dbStrings.size(); i++) {
getJavaStrings()[i] = (String)dbStrings.elementAt(i);
}
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | ref()INTERNAL:
Build operator.
return simpleFunction(Ref, "REF");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | refToHex()INTERNAL:
Build operator.
return simpleFunction(RefToHex, "REFTOHEX");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | replace()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(Replace, "REPLACE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | replicate()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Replicate, "REPLICATE");
|
public boolean | representsEqualToNull(java.lang.Object singleArgument)INTERNAL:
Test if this operator instance represents a comparison to null, which
we have to print specially. Also special-cased for performance.
if (singleArgument instanceof Vector) {
return representsEqualToNull((Vector)singleArgument);
}
return (getSelector() == Equal) && (singleArgument == null);
|
public boolean | representsEqualToNull(java.util.Vector arguments)INTERNAL:
Test if this operator instance represents a comparison to null, which
we have to print specially.
return (getSelector() == Equal) && (arguments.size() == 1) && (arguments.elementAt(0) == null);
|
public boolean | representsNotEqualToNull(java.lang.Object singleArgument)INTERNAL:
Test if this operator instance represents a comparison to null, which
we have to print specially. Also special-cased for performance.
if (singleArgument instanceof Vector) {
return representsNotEqualToNull((Vector)singleArgument);
}
return (getSelector() == NotEqual) && (singleArgument == null);
|
public boolean | representsNotEqualToNull(java.util.Vector arguments)INTERNAL:
Test if this operator instance represents a comparison to null, which
we have to print specially.
return (getSelector() == NotEqual) && (arguments.size() == 1) && (arguments.elementAt(0) == null);
|
public static void | resetOperators()INTERNAL:
Reset all the operators.
allOperators = new Hashtable();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | reverse()INTERNAL:
Build operator.
return simpleFunction(Reverse, "REVERSE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | right()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Right, "RIGHT");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | rightPad()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(RightPad, "RPAD");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | rightTrim()INTERNAL:
Build operator.
return simpleFunction(RightTrim, "RTRIM");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | rightTrim2()INTERNAL:
Build rightTrim operator that takes one parameter.
return simpleTwoArgumentFunction(RightTrim2, "RTRIM");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | round()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Round, "ROUND");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | roundDate()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(RoundDate, "ROUND");
|
public void | setArgumentIndices(int[] indices)ADVANCED:
Set the array of indexes to use when building the SQL function.
argumentIndices = indices;
|
public void | setNodeClass(java.lang.Class nodeClass)ADVANCED:
Set the node class for this operator. For user-defined functions this is
set automatically but can be changed.
A list of Operator types, an example, and the node class used follows.
LogicalOperator AND LogicalExpression
ComparisonOperator <> RelationExpression
AggregateOperator COUNT FunctionExpression
OrderOperator ASCENDING "
FunctionOperator RTRIM "
Node classes given belong to oracle.toplink.essentials.internal.expressions.
this.nodeClass = nodeClass;
|
public void | setSelector(int selector)INTERNAL:
Set the selector id.
this.selector = selector;
|
public void | setType(int type)ADVANCED:
Set the type of function.
This must be one of the static function types defined in this class.
this.type = type;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sign()INTERNAL:
Build operator.
return simpleFunction(Sign, "SIGN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleAggregate(int selector, java.lang.String databaseName, java.lang.String javaName)INTERNAL:
Create an operator for a simple aggregate given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(AggregateOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement(databaseName + "(");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.printsJavaAs("." + javaName + "()");
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleFunction(int selector, java.lang.String databaseName)INTERNAL:
Create an operator for a simple function given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement(databaseName + "(");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleFunction(int selector, java.lang.String databaseName, java.lang.String javaName)INTERNAL:
Create an operator for a simple function given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = simpleFunction(selector, databaseName);
exOperator.printsJavaAs("." + javaName + "()");
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleFunctionNoParentheses(int selector, java.lang.String databaseName)INTERNAL:
Create an operator for a simple function call without parentheses
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1);
v.addElement(databaseName);
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleLogical(int selector, java.lang.String databaseName, java.lang.String javaName)INTERNAL:
Create an operator for a simple logical given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(LogicalOperator);
exOperator.setSelector(selector);
exOperator.printsAs(" " + databaseName + " ");
exOperator.bePostfix();
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("." + javaName + "(");
v.addElement(")");
exOperator.printsJavaAs(v);
exOperator.setNodeClass(ClassConstants.LogicalExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleLogicalNoParens(int selector, java.lang.String dbString)INTERNAL:
e.g.: ... "Bob" CONCAT "Smith" ...
Parentheses will not be addded. [RMB - March 5 2000]
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(5);
v.addElement("");
v.addElement(" " + dbString + " ");
v.addElement("");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleMath(int selector, java.lang.String databaseName)INTERNAL:
Create an operator for a simple math operatin, i.e. +, -, *, /
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);
v.addElement("(");
v.addElement(" " + databaseName + " ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleOrdering(int selector, java.lang.String databaseName, java.lang.String javaName)INTERNAL:
Create an operator for a simple ordering given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(OrderOperator);
exOperator.setSelector(selector);
exOperator.printsAs(" " + databaseName);
exOperator.bePostfix();
exOperator.printsJavaAs("." + javaName + "()");
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleRelation(int selector, java.lang.String databaseName)INTERNAL:
Create an operator for a simple relation given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(ComparisonOperator);
exOperator.setSelector(selector);
exOperator.printsAs(" " + databaseName + " ");
exOperator.bePostfix();
exOperator.setNodeClass(ClassConstants.RelationExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleRelation(int selector, java.lang.String databaseName, java.lang.String javaName)INTERNAL:
Create an operator for a simple relation given a Java name and a single
String for the database (parentheses will be added automatically).
ExpressionOperator exOperator = simpleRelation(selector, databaseName);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("." + javaName + "(");
v.addElement(")");
exOperator.printsJavaAs(v);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleThreeArgumentFunction(int selector, java.lang.String dbString)INTERNAL:
Build operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(4);
v.addElement(dbString + "(");
v.addElement(", ");
v.addElement(", ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | simpleTwoArgumentFunction(int selector, java.lang.String dbString)INTERNAL:
Build operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(selector);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(5);
v.addElement(dbString + "(");
v.addElement(", ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sin()INTERNAL:
Build operator.
return simpleFunction(Sin, "SIN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sinh()INTERNAL:
Build operator.
return simpleFunction(Sinh, "SINH");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | some()INTERNAL:
Create the SOME operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Some);
exOperator.printsAs("SOME");
exOperator.bePostfix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | soundex()INTERNAL:
Build operator.
return simpleFunction(Soundex, "SOUNDEX");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sqrt()INTERNAL:
Build operator.
return simpleFunction(Sqrt, "SQRT");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | standardDeviation()INTERNAL:
Build operator.
return simpleAggregate(StandardDeviation, "STDDEV", "standardDeviation");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | substring()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(Substring, "SUBSTR");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sum()INTERNAL:
Create the SUM operator.
return simpleAggregate(Sum, "SUM", "sum");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseAddMonthsOperator()INTERNAL:
Function, to add months to a date.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(AddMonths);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);
v.addElement("DATEADD(month, ");
v.addElement(", ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
int[] indices = { 1, 0 };
exOperator.setArgumentIndices(indices);
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseAtan2Operator()INTERNAL:
Build operator.
return ExpressionOperator.simpleTwoArgumentFunction(Atan2, "ATN2");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseInStringOperator()INTERNAL:
Build instring operator
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Instring);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);
v.addElement("CHARINDEX(");
v.addElement(", ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
int[] indices = { 1, 0 };
exOperator.setArgumentIndices(indices);
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseLocateOperator()INTERNAL:
Build the Sybase equivalent to Locate
ExpressionOperator result = simpleTwoArgumentFunction(ExpressionOperator.Locate, "CHARINDEX");
int[] argumentIndices = new int[2];
argumentIndices[0] = 1;
argumentIndices[1] = 0;
result.setArgumentIndices(argumentIndices);
return result;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseToCharOperator()INTERNAL:
Build Sybase equivalent to TO_CHAR.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(ToChar);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("CONVERT(CHAR, ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseToCharWithFormatOperator()INTERNAL:
Build Sybase equivalent to TO_CHAR.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(ToCharWithFormat);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);
v.addElement("CONVERT(CHAR, ");
v.addElement(",");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseToDateOperator()INTERNAL:
Build Sybase equivalent to TO_DATE.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(ToDate);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("CONVERT(DATETIME, ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseToDateToStringOperator()INTERNAL:
Build Sybase equivalent to TO_CHAR.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(DateToString);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("CONVERT(CHAR, ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | sybaseToNumberOperator()INTERNAL:
Build Sybase equivalent to TO_NUMBER.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(ToNumber);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2);
v.addElement("CONVERT(NUMERIC, ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | tan()INTERNAL:
Build operator.
return simpleFunction(Tan, "TAN");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | tanh()INTERNAL:
Build operator.
return simpleFunction(Tanh, "TANH");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toChar()INTERNAL:
Build operator.
return simpleFunction(ToChar, "TO_CHAR");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toCharWithFormat()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(ToCharWithFormat, "TO_CHAR");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toDate()INTERNAL:
Build operator.
return simpleFunction(ToDate, "TO_DATE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toLowerCase()INTERNAL:
Create the toLowerCase operator.
return simpleFunction(ToLowerCase, "LOWER", "toLowerCase");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toNumber()INTERNAL:
Build operator.
return simpleFunction(ToNumber, "TO_NUMBER");
|
public java.lang.String | toString()Print a debug representation of this operator.
if ((getDatabaseStrings() == null) || (getDatabaseStrings().length == 0)) {
//CR#... Print a useful name for the missing plaftorm operator.
return "platform operator - " + getPlatformOperatorName(getSelector());
} else {
return "operator " + getDatabaseStrings()[0];
}
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | toUpperCase()INTERNAL:
Create the TOUPPERCASE operator.
return simpleFunction(ToUpperCase, "UPPER", "toUpperCase");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | today()INTERNAL:
Build operator.
return currentTimeStamp();
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | translate()INTERNAL:
Build operator.
return simpleThreeArgumentFunction(Translate, "TRANSLATE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | trim()INTERNAL:
Build operator.
return simpleFunction(Trim, "TRIM");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | trim2()INTERNAL:
Build Trim operator.
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(FunctionOperator);
exOperator.setSelector(Trim2);
Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(5);
v.addElement("TRIM(");
v.addElement(" FROM ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | trunc()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(Trunc, "TRUNC");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | truncateDate()INTERNAL:
Build operator.
return simpleTwoArgumentFunction(TruncateDate, "TRUNC");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | value()INTERNAL:
Build operator.
return simpleFunction(Value, "VALUE");
|
public static oracle.toplink.essentials.expressions.ExpressionOperator | variance()INTERNAL:
Build operator.
return simpleAggregate(Variance, "VARIANCE", "variance");
|