1 21 22 package oracle.toplink.essentials.expressions; 24 25 import java.util.*; 26 import java.io.*; 27 import oracle.toplink.essentials.queryframework.*; 28 import oracle.toplink.essentials.exceptions.*; 29 import oracle.toplink.essentials.internal.helper.*; 30 import oracle.toplink.essentials.internal.expressions.*; 31 import oracle.toplink.essentials.internal.localization.*; 32 import oracle.toplink.essentials.internal.sessions.AbstractRecord; 33 import oracle.toplink.essentials.internal.sessions.AbstractSession; 34 import oracle.toplink.essentials.descriptors.ClassDescriptor; 35 36 54 public abstract class Expression implements Serializable, Cloneable { 55 56 57 static final long serialVersionUID = -5979150600092006081L; 58 59 60 protected transient DatabaseTable lastTable; 61 protected transient DatabaseTable currentAlias; 62 protected boolean selectIfOrderedBy = true; 63 64 67 public Expression() { 68 super(); 69 } 70 71 82 public Expression addDate(String datePart, int numberToAdd) { 83 return addDate(datePart, new Integer (numberToAdd)); 84 } 85 86 97 public Expression addDate(String datePart, Object numberToAdd) { 98 ExpressionOperator anOperator = getOperator(ExpressionOperator.AddDate); 99 FunctionExpression expression = new FunctionExpression(); 100 expression.setBaseExpression(this); 101 expression.addChild(this); 102 expression.addChild(Expression.fromLiteral(datePart, this)); 103 expression.addChild(Expression.from(numberToAdd, this)); 104 expression.setOperator(anOperator); 105 return expression; 106 } 107 108 112 public Expression addMonths(int months) { 113 return addMonths(new Integer (months)); 114 } 115 116 120 public Expression addMonths(Object months) { 121 ExpressionOperator anOperator = getOperator(ExpressionOperator.AddMonths); 122 return anOperator.expressionFor(this, months); 123 } 124 125 129 public DatabaseTable aliasForTable(DatabaseTable table) { 130 return null; 131 } 132 133 182 public Expression allOf(String attributeName, Expression criteria) { 183 ReportQuery subQuery = new ReportQuery(); 184 subQuery.setShouldRetrieveFirstPrimaryKey(true); 185 Expression builder = criteria.getBuilder(); 186 criteria = builder.equal(anyOf(attributeName)).and(criteria.not()); 187 subQuery.setSelectionCriteria(criteria); 188 return notExists(subQuery); 189 } 190 191 202 public Expression and(Expression theExpression) { 203 if (theExpression == null) { 205 return this; 206 } 207 208 ExpressionBuilder base = getBuilder(); 209 Expression expressionToUse = theExpression; 210 211 if ((theExpression.getBuilder() != base) && ((base == this) || (theExpression.getBuilder().getQueryClass() == null))) { 215 expressionToUse = theExpression.rebuildOn(base); 216 } 217 218 if (base == this) { return expressionToUse; 220 } 221 222 ExpressionOperator anOperator = getOperator(ExpressionOperator.And); 223 return anOperator.expressionFor(this, expressionToUse); 224 } 225 226 258 public Expression anyOf(String attributeName) { 259 QueryKeyExpression queryKey = (QueryKeyExpression)get(attributeName); 260 261 queryKey.doQueryToManyRelationship(); 262 return queryKey; 263 264 } 265 266 301 public Expression anyOfAllowingNone(String attributeName) { 302 QueryKeyExpression queryKey = (QueryKeyExpression)getAllowingNull(attributeName); 303 304 queryKey.doQueryToManyRelationship(); 305 return queryKey; 306 307 } 308 309 318 public Expression ascending() { 319 return getFunction(ExpressionOperator.Ascending); 320 } 321 322 326 public Expression asciiValue() { 327 ExpressionOperator anOperator = getOperator(ExpressionOperator.Ascii); 328 return anOperator.expressionFor(this); 329 } 330 331 335 protected void assignAlias(String name, DatabaseTable tableOrExpression) { 336 } 338 339 345 public int assignTableAliasesStartingAt(int initialValue) { 346 if (hasBeenAliased()) { 347 return initialValue; 348 } 349 int counter = initialValue; 350 Vector ownedTables = getOwnedTables(); 351 if (ownedTables != null) { 352 for (Enumeration e = ownedTables.elements(); e.hasMoreElements();) { 353 assignAlias("t" + counter, (DatabaseTable)e.nextElement()); 354 counter++; 355 } 356 } 357 return counter; 358 } 359 360 364 public Expression average() { 365 return getFunction(ExpressionOperator.Average); 366 } 367 368 372 public Expression between(byte leftValue, byte rightValue) { 373 return between(new Byte (leftValue), new Byte (rightValue)); 374 } 375 376 380 public Expression between(char leftChar, char rightChar) { 381 return between(new Character (leftChar), new Character (rightChar)); 382 } 383 384 388 public Expression between(double leftValue, double rightValue) { 389 return between(new Double (leftValue), new Double (rightValue)); 390 } 391 392 396 public Expression between(float leftValue, float rightValue) { 397 return between(new Float (leftValue), new Float (rightValue)); 398 } 399 400 404 public Expression between(int leftValue, int rightValue) { 405 return between(new Integer (leftValue), new Integer (rightValue)); 406 } 407 408 412 public Expression between(long leftValue, long rightValue) { 413 return between(new Long (leftValue), new Long (rightValue)); 414 } 415 416 430 public Expression between(Object leftValue, Object rightValue) { 431 ExpressionOperator anOperator = getOperator(ExpressionOperator.Between); 432 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 433 args.addElement(leftValue); 434 args.addElement(rightValue); 435 return anOperator.expressionForArguments(this, args); 436 } 437 438 public Expression between(Expression leftExpression, Expression rightExpression) { 439 return between((Object )leftExpression, (Object )rightExpression); 440 441 } 442 443 447 public Expression between(short leftValue, short rightValue) { 448 return between(new Short (leftValue), new Short (rightValue)); 449 } 450 451 475 public Expression caseStatement(Hashtable caseItems, String defaultItem) { 476 477 486 ExpressionOperator anOperator = new ExpressionOperator(); 487 anOperator.setSelector(ExpressionOperator.Case); 488 anOperator.setNodeClass(FunctionExpression.class); 489 anOperator.setType(ExpressionOperator.FunctionOperator); 490 anOperator.bePrefix(); 491 492 Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(caseItems.size() + 1); 493 v.addElement("CASE "); 494 495 FunctionExpression expression = new FunctionExpression(); 496 expression.setBaseExpression(this); 497 expression.addChild(this); 498 Enumeration enumeration = caseItems.keys(); 499 while (enumeration.hasMoreElements()) { 500 Object key = enumeration.nextElement(); 501 expression.addChild(Expression.from(key, this)); 502 expression.addChild(Expression.from(caseItems.get(key), this)); 503 v.addElement(" WHEN "); 504 v.addElement(" THEN "); 505 } 506 ; 507 v.addElement(" ELSE "); 508 expression.addChild(Expression.from(defaultItem, this)); 509 v.addElement(" END"); 510 anOperator.printsAs(v); 511 expression.setOperator(anOperator); 512 return expression; 513 } 514 515 519 public Object clone() { 520 Dictionary alreadyDone = new IdentityHashtable(); 522 return copiedVersionFrom(alreadyDone); 523 } 524 525 539 public Expression cloneUsing(Expression newBase) { 540 Dictionary alreadyDone = new IdentityHashtable(); 542 543 alreadyDone.put(alreadyDone, newBase); 550 return copiedVersionFrom(alreadyDone); 551 } 552 553 557 public Expression concat(Object left) { 558 ExpressionOperator anOperator = getOperator(ExpressionOperator.Concat); 559 return anOperator.expressionFor(this, left); 560 } 561 562 570 public Expression containsAllKeyWords(String spaceSeperatedKeyWords) { 571 StringTokenizer tokenizer = new StringTokenizer(spaceSeperatedKeyWords); 572 Expression expression = null; 573 while (tokenizer.hasMoreTokens()) { 574 String token = tokenizer.nextToken(); 575 if (expression == null) { 576 expression = containsSubstringIgnoringCase(token); 577 } else { 578 expression = expression.and(containsSubstringIgnoringCase(token)); 579 } 580 } 581 582 if (expression == null) { 583 return like("%"); 584 } else { 585 return expression; 586 } 587 } 588 589 597 public Expression containsAnyKeyWords(String spaceSeperatedKeyWords) { 598 StringTokenizer tokenizer = new StringTokenizer(spaceSeperatedKeyWords); 599 Expression expression = null; 600 while (tokenizer.hasMoreTokens()) { 601 String token = tokenizer.nextToken(); 602 if (expression == null) { 603 expression = containsSubstringIgnoringCase(token); 604 } else { 605 expression = expression.or(containsSubstringIgnoringCase(token)); 606 } 607 } 608 609 if (expression == null) { 610 return like("%"); 611 } else { 612 return expression; 613 } 614 } 615 616 626 public Expression containsSubstring(String theValue) { 627 return like("%" + theValue + "%"); 628 } 629 630 640 public Expression containsSubstring(Expression expression) { 641 return like((value("%").concat(expression)).concat("%")); 642 } 643 644 654 public Expression containsSubstringIgnoringCase(String theValue) { 655 return toUpperCase().containsSubstring(theValue.toUpperCase()); 656 } 657 658 668 public Expression containsSubstringIgnoringCase(Expression expression) { 669 return toUpperCase().containsSubstring(expression.toUpperCase()); 670 } 671 672 676 protected void convertNodeToUseOuterJoin() { 677 } 678 679 684 public Expression convertToUseOuterJoin() { 685 ExpressionIterator iterator = new ExpressionIterator() { 686 public void iterate(Expression each) { 687 each.convertNodeToUseOuterJoin(); 688 } 689 }; 690 iterator.iterateOn(this); 691 return this; 692 } 693 694 697 public Expression copiedVersionFrom(Dictionary alreadyDone) { 698 Expression existing = (Expression)alreadyDone.get(this); 699 if (existing == null) { 700 return registerIn(alreadyDone); 701 } else { 702 return existing; 703 } 704 } 705 706 710 public Expression count() { 711 return getFunction(ExpressionOperator.Count); 712 } 713 714 717 public Expression create(Expression base, Object singleArgument, ExpressionOperator anOperator) { 718 return this; 721 } 722 723 726 public Expression createWithBaseLast(Expression base, Object singleArgument, ExpressionOperator anOperator) { 727 return this; 730 } 731 732 735 public Expression create(Expression base, Vector arguments, ExpressionOperator anOperator) { 736 return this; 739 } 740 741 745 public Expression currentDate() { 746 return getFunction(ExpressionOperator.Today); 747 } 748 749 755 public Expression currentDateDate() { 756 return getFunction(ExpressionOperator.currentDate); 757 } 758 759 770 public Expression dateDifference(String datePart, java.util.Date date) { 771 ExpressionOperator anOperator = getOperator(ExpressionOperator.DateDifference); 772 FunctionExpression expression = new FunctionExpression(); 773 expression.setBaseExpression(this); 774 expression.addChild(Expression.fromLiteral(datePart, this)); 775 expression.addChild(Expression.from(date, this)); 776 expression.addChild(this); 777 expression.setOperator(anOperator); 778 return expression; 779 } 780 781 792 public Expression dateDifference(String datePart, Expression comparisonExpression) { 793 ExpressionOperator anOperator = getOperator(ExpressionOperator.DateDifference); 794 FunctionExpression expression = new FunctionExpression(); 795 expression.setBaseExpression(this); 796 expression.addChild(Expression.fromLiteral(datePart, this)); 797 expression.addChild(comparisonExpression); 798 expression.addChild(this); 799 expression.setOperator(anOperator); 800 return expression; 801 } 802 803 814 public Expression dateName(String datePart) { 815 ExpressionOperator anOperator = getOperator(ExpressionOperator.DateName); 816 FunctionExpression expression = new FunctionExpression(); 817 expression.setBaseExpression(this); 818 expression.addChild(Expression.fromLiteral(datePart, this)); 819 expression.addChild(this); 820 expression.setOperator(anOperator); 821 return expression; 822 } 823 824 834 public Expression datePart(String datePart) { 835 ExpressionOperator anOperator = getOperator(ExpressionOperator.DatePart); 836 FunctionExpression expression = new FunctionExpression(); 837 expression.setBaseExpression(this); 838 expression.addChild(Expression.fromLiteral(datePart, this)); 839 expression.addChild(this); 840 expression.setOperator(anOperator); 841 return expression; 842 } 843 844 848 public Expression dateToString() { 849 ExpressionOperator anOperator = getOperator(ExpressionOperator.DateToString); 850 return anOperator.expressionFor(this); 851 } 852 853 877 public Expression decode(Hashtable decodeableItems, String defaultItem) { 878 879 888 ExpressionOperator anOperator = new ExpressionOperator(); 889 anOperator.setSelector(ExpressionOperator.Decode); 890 anOperator.setNodeClass(ClassConstants.FunctionExpression_Class); 891 anOperator.setType(ExpressionOperator.FunctionOperator); 892 anOperator.bePrefix(); 893 894 Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(decodeableItems.size() + 1); 895 v.addElement("DECODE("); 896 for (int i = 0; i < ((decodeableItems.size() * 2) + 1); i++) { 897 v.addElement(", "); 898 } 899 ; 900 v.addElement(")"); 901 anOperator.printsAs(v); 902 903 FunctionExpression expression = new FunctionExpression(); 904 expression.setBaseExpression(this); 905 expression.addChild(this); 906 Enumeration enumeration = decodeableItems.keys(); 907 while (enumeration.hasMoreElements()) { 908 Object key = enumeration.nextElement(); 909 expression.addChild(Expression.from(key, this)); 910 expression.addChild(Expression.from(decodeableItems.get(key), this)); 911 } 912 ; 913 expression.addChild(Expression.from(defaultItem, this)); 914 expression.setOperator(anOperator); 915 return expression; 916 } 917 918 927 public Expression descending() { 928 return getFunction(ExpressionOperator.Descending); 929 } 930 931 935 public String descriptionOfNodeType() { 936 return "Expression"; 937 } 938 939 940 944 public boolean detectExpression(Vector theObjects) { 945 boolean foundExpression = false; 946 int size = theObjects.size(); 947 for (int i = 0; i < size; i++) { 948 Object element = theObjects.get(i); 949 if (element instanceof Expression) { 950 foundExpression = true; 951 break; 952 } 953 } 954 return foundExpression; 955 } 956 957 966 public Expression difference(String expression) { 967 ExpressionOperator anOperator = getOperator(ExpressionOperator.Difference); 968 return anOperator.expressionFor(this, expression); 969 } 970 971 975 public Expression distinct() { 976 return getFunction(ExpressionOperator.Distinct); 977 } 978 979 986 public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) throws QueryException { 987 return doesConform(object, session, translationRow, valueHolderPolicy, false); 988 } 989 990 998 public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean objectIsUnregistered) throws QueryException { 999 throw QueryException.cannotConformExpression(); 1000 } 1001 1002 public Expression equal(byte theValue) { 1003 return equal(new Byte (theValue)); 1004 } 1005 1006 public Expression equal(char theChar) { 1007 return equal(new Character (theChar)); 1008 } 1009 1010 public Expression equal(double theValue) { 1011 return equal(new Double (theValue)); 1012 } 1013 1014 public Expression equal(float theValue) { 1015 return equal(new Float (theValue)); 1016 } 1017 1018 public Expression equal(int theValue) { 1019 return equal(new Integer (theValue)); 1020 } 1021 1022 public Expression equal(long theValue) { 1023 return equal(new Long (theValue)); 1024 } 1025 1026 1037 public Expression equal(Object theValue) { 1038 ExpressionOperator anOperator = getOperator(ExpressionOperator.Equal); 1039 return anOperator.expressionFor(this, theValue); 1040 } 1041 1042 1057 public Expression equal(Expression theValue) { 1058 ExpressionOperator anOperator = getOperator(ExpressionOperator.Equal); 1059 return anOperator.expressionFor(this, theValue); 1060 1061 } 1062 1063 public Expression equal(short theValue) { 1064 return equal(new Short (theValue)); 1065 } 1066 1067 public Expression equal(boolean theBoolean) { 1068 return equal(new Boolean (theBoolean)); 1069 } 1070 1071 1075 1076 public Expression equalOuterJoin(Object theValue) { 1078 ExpressionOperator anOperator = getOperator(ExpressionOperator.EqualOuterJoin); 1079 return anOperator.expressionFor(this, theValue); 1080 } 1081 1082 1086 public Expression equalOuterJoin(Expression theValue) { 1087 ExpressionOperator anOperator = getOperator(ExpressionOperator.EqualOuterJoin); 1088 return anOperator.expressionFor(this, theValue); 1089 1090 } 1091 1092 1103 public Expression equalsIgnoreCase(String theValue) { 1104 return toUpperCase().equal(theValue.toUpperCase()); 1105 } 1106 1107 1118 public Expression equalsIgnoreCase(Expression theValue) { 1119 return toUpperCase().equal(theValue.toUpperCase()); 1120 } 1121 1122 1135 public Expression exists(ReportQuery subQuery) { 1136 ExpressionOperator anOperator = getOperator(ExpressionOperator.Exists); 1137 return anOperator.expressionFor(subQuery(subQuery)); 1138 } 1139 1140 1146 public boolean extractPrimaryKeyValues(boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow) { 1147 return false; 1148 } 1149 1150 1154 public static Expression from(Object value, Expression base) { 1155 if (value instanceof Expression) { 1157 Expression exp = (Expression)value; 1158 if (exp.isValueExpression()) { 1159 exp.setLocalBase(base); 1160 } else { 1161 base.setLocalBase(exp); 1164 } 1165 return exp; 1166 } 1167 if (value instanceof ReportQuery) { 1168 Expression exp = base.subQuery((ReportQuery)value); 1169 exp.setLocalBase(base); base.setLocalBase(exp); 1171 return exp; 1172 } 1173 return fromConstant(value, base); 1174 1175 } 1176 1177 1181 public static Expression fromConstant(Object value, Expression base) { 1182 return new ConstantExpression(value, base); 1183 } 1184 1185 1189 public static Expression fromLiteral(String value, Expression base) { 1190 return new LiteralExpression(value, base); 1191 } 1192 1193 1202 public Expression get(String attributeName) { 1203 return get(attributeName, null); 1204 } 1205 1206 1209 public Expression get(String attributeName, Vector arguments) { 1210 return null; 1211 } 1212 1213 1224 public Expression getAllowingNull(String attributeName) { 1225 return getAllowingNull(attributeName, null); 1226 } 1227 1228 1231 public Expression getAllowingNull(String attributeName, Vector arguments) { 1232 1233 1234 return get(attributeName, arguments); 1235 } 1236 1237 1242 public abstract ExpressionBuilder getBuilder(); 1243 1244 1248 public DatabaseField getClonedField() { 1249 return null; 1250 } 1251 1252 1263 public Expression getField(String fieldName) { 1264 throw QueryException.illegalUseOfGetField(fieldName); 1265 } 1266 1267 1276 public Expression getField(DatabaseField field) { 1277 throw QueryException.illegalUseOfGetField(field); 1278 } 1279 1280 1283 public Vector getFields() { 1284 return oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1); 1285 } 1286 1287 1291 public Object getFieldValue(Object objectValue) { 1292 return objectValue; 1293 1294 } 1295 1296 1306 public Expression getFunction(int selector) { 1307 ExpressionOperator anOperator = getOperator(selector); 1308 return anOperator.expressionFor(this); 1309 } 1310 1311 1323 public Expression getFunction(int selector, Vector arguments) { 1324 ExpressionOperator anOperator = getOperator(selector); 1325 return anOperator.expressionForArguments(this, arguments); 1326 } 1327 1328 1337 public Expression getFunction(String functionName) { 1338 ExpressionOperator anOperator = ExpressionOperator.simpleFunction(0, functionName); 1339 return anOperator.expressionFor(this); 1340 } 1341 1342 1347 public Expression getFunction(String functionName, Object argument) { 1348 ExpressionOperator anOperator = ExpressionOperator.simpleTwoArgumentFunction(0, functionName); 1349 return anOperator.expressionFor(this, argument); 1350 } 1351 1352 1357 public Expression getFunctionWithArguments(String functionName, Vector arguments) { 1358 ExpressionOperator anOperator = new ExpressionOperator(); 1359 anOperator.setType(ExpressionOperator.FunctionOperator); 1360 Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(arguments.size()); 1361 v.addElement(functionName + "("); 1362 for (int index = 0; index < arguments.size(); index++) { 1363 v.addElement(", "); 1364 } 1365 v.addElement(")"); 1366 anOperator.printsAs(v); 1367 anOperator.bePrefix(); 1368 anOperator.setNodeClass(ClassConstants.FunctionExpression_Class); 1369 1370 return anOperator.expressionForArguments(this, arguments); 1371 } 1372 1373 1376 public String getName() { 1377 return ""; 1378 } 1379 1380 1384 public ExpressionOperator getOperator() { 1385 return null; 1386 } 1387 1388 1392 public ExpressionOperator getOperator(int selector) { 1393 ExpressionOperator result = ExpressionOperator.getOperator(new Integer (selector)); 1394 if (result != null) { 1395 return result; 1396 } 1397 1398 result = new ExpressionOperator(); 1401 result.setSelector(selector); 1402 result.setNodeClass(ClassConstants.FunctionExpression_Class); 1403 return result; 1404 } 1405 1406 1410 public Vector getOwnedTables() { 1411 return null; 1412 } 1413 1414 1418 public Expression getParameter(String parameterName, Object type) { 1419 return new ParameterExpression(parameterName, this, type); 1420 1421 } 1422 1423 1427 public Expression getParameter(String parameterName) { 1428 return new ParameterExpression(parameterName, this, null); 1429 1430 } 1431 1432 1436 public Expression getParameter(DatabaseField field) { 1437 return new ParameterExpression(field, this); 1438 1439 } 1440 1441 1444 public AbstractSession getSession() { 1445 return getBuilder().getSession(); 1446 } 1447 1448 1457 public Expression getTable(String tableName) { 1458 DatabaseTable table = new DatabaseTable(tableName); 1459 return getTable(table); 1460 } 1461 1462 1471 public Expression getTable(DatabaseTable table) { 1472 throw QueryException.illegalUseOfGetTable(table); 1473 } 1474 1475 1479 public TableAliasLookup getTableAliases() { 1480 return null; 1481 1482 } 1483 1484 1489 public Expression greaterThan(byte theValue) { 1490 return greaterThan(new Byte (theValue)); 1491 } 1492 1493 1498 public Expression greaterThan(char theChar) { 1499 return greaterThan(new Character (theChar)); 1500 } 1501 1502 1507 public Expression greaterThan(double theValue) { 1508 return greaterThan(new Double (theValue)); 1509 } 1510 1511 1516 public Expression greaterThan(float theValue) { 1517 return greaterThan(new Float (theValue)); 1518 } 1519 1520 1525 public Expression greaterThan(int theValue) { 1526 return greaterThan(new Integer (theValue)); 1527 } 1528 1529 1534 public Expression greaterThan(long theValue) { 1535 return greaterThan(new Long (theValue)); 1536 } 1537 1538 1543 public Expression greaterThan(Object theValue) { 1544 ExpressionOperator anOperator = getOperator(ExpressionOperator.GreaterThan); 1545 return anOperator.expressionFor(this, theValue); 1546 } 1547 1548 public Expression greaterThan(Expression theValue) { 1549 ExpressionOperator anOperator = getOperator(ExpressionOperator.GreaterThan); 1550 return anOperator.expressionFor(this, theValue); 1551 1552 } 1553 1554 1559 public Expression greaterThan(short theValue) { 1560 return greaterThan(new Short (theValue)); 1561 } 1562 1563 1568 public Expression greaterThan(boolean theBoolean) { 1569 return greaterThan(new Boolean (theBoolean)); 1570 } 1571 1572 1577 public Expression greaterThanEqual(byte theValue) { 1578 return greaterThanEqual(new Byte (theValue)); 1579 } 1580 1581 1586 public Expression greaterThanEqual(char theChar) { 1587 return greaterThanEqual(new Character (theChar)); 1588 } 1589 1590 1595 public Expression greaterThanEqual(double theValue) { 1596 return greaterThanEqual(new Double (theValue)); 1597 } 1598 1599 1604 public Expression greaterThanEqual(float theValue) { 1605 return greaterThanEqual(new Float (theValue)); 1606 } 1607 1608 1613 public Expression greaterThanEqual(int theValue) { 1614 return greaterThanEqual(new Integer (theValue)); 1615 } 1616 1617 1622 public Expression greaterThanEqual(long theValue) { 1623 return greaterThanEqual(new Long (theValue)); 1624 } 1625 1626 1631 public Expression greaterThanEqual(Object theValue) { 1632 ExpressionOperator anOperator = getOperator(ExpressionOperator.GreaterThanEqual); 1633 return anOperator.expressionFor(this, theValue); 1634 1635 } 1636 1637 1642 public Expression greaterThanEqual(Expression theValue) { 1643 ExpressionOperator anOperator = getOperator(ExpressionOperator.GreaterThanEqual); 1644 return anOperator.expressionFor(this, theValue); 1645 1646 } 1647 1648 1653 public Expression greaterThanEqual(short theValue) { 1654 return greaterThanEqual(new Short (theValue)); 1655 } 1656 1657 1662 public Expression greaterThanEqual(boolean theBoolean) { 1663 return greaterThanEqual(new Boolean (theBoolean)); 1664 } 1665 1666 1672 public boolean hasAsOfClause() { 1673 return false; 1674 } 1675 1676 1681 public boolean hasBeenAliased() { 1682 return false; 1683 } 1684 1685 1689 public Expression hexToRaw() { 1690 ExpressionOperator anOperator = getOperator(ExpressionOperator.HexToRaw); 1691 return anOperator.expressionFor(this); 1692 } 1693 1694 1705 public Expression ifNull(Object nullValue) { 1706 ExpressionOperator anOperator = getOperator(ExpressionOperator.Nvl); 1707 return anOperator.expressionFor(this, nullValue); 1708 } 1709 1710 1715 public Expression in(byte[] theBytes) { 1716 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1717 1718 for (int index = 0; index < theBytes.length; index++) { 1719 vector.addElement(new Byte (theBytes[index])); 1720 } 1721 1722 return in(vector); 1723 } 1724 1725 1730 public Expression in(char[] theChars) { 1731 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1732 1733 for (int index = 0; index < theChars.length; index++) { 1734 vector.addElement(new Character (theChars[index])); 1735 } 1736 1737 return in(vector); 1738 } 1739 1740 1745 public Expression in(double[] theDoubles) { 1746 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1747 1748 for (int index = 0; index < theDoubles.length; index++) { 1749 vector.addElement(new Double (theDoubles[index])); 1750 } 1751 1752 return in(vector); 1753 } 1754 1755 1760 public Expression in(float[] theFloats) { 1761 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1762 1763 for (int index = 0; index < theFloats.length; index++) { 1764 vector.addElement(new Float (theFloats[index])); 1765 } 1766 1767 return in(vector); 1768 } 1769 1770 1775 public Expression in(int[] theInts) { 1776 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1777 1778 for (int index = 0; index < theInts.length; index++) { 1779 vector.addElement(new Integer (theInts[index])); 1780 } 1781 1782 return in(vector); 1783 } 1784 1785 1790 public Expression in(long[] theLongs) { 1791 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1792 1793 for (int index = 0; index < theLongs.length; index++) { 1794 vector.addElement(new Long (theLongs[index])); 1795 } 1796 1797 return in(vector); 1798 } 1799 1800 1805 public Expression in(Object [] theObjects) { 1806 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1807 1808 for (int index = 0; index < theObjects.length; index++) { 1809 vector.addElement(theObjects[index]); 1810 } 1811 1812 return in(vector); 1813 } 1814 1815 1820 public Expression in(short[] theShorts) { 1821 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1822 1823 for (int index = 0; index < theShorts.length; index++) { 1824 vector.addElement(new Short (theShorts[index])); 1825 } 1826 1827 return in(vector); 1828 } 1829 1830 1835 public Expression in(boolean[] theBooleans) { 1836 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 1837 1838 for (int index = 0; index < theBooleans.length; index++) { 1839 vector.addElement(new Boolean (theBooleans[index])); 1840 } 1841 1842 return in(vector); 1843 } 1844 1845 1857 public Expression in(Vector theObjects) { 1858 if (!detectExpression(theObjects)) { 1860 return in(new ConstantExpression(theObjects, this)); 1861 } 1862 ExpressionOperator anOperator = getOperator(ExpressionOperator.In); 1864 return anOperator.expressionForArguments(this, theObjects); 1865 } 1866 1867 public Expression in(Expression arguments) { 1868 ExpressionOperator anOperator = getOperator(ExpressionOperator.In); 1869 return anOperator.expressionFor(this, arguments); 1870 } 1871 1872 public Expression in(ReportQuery subQuery) { 1873 return in(subQuery(subQuery)); 1874 } 1875 1876 1880 public Expression indexOf(Object substring) { 1881 ExpressionOperator anOperator = getOperator(ExpressionOperator.Instring); 1882 return anOperator.expressionFor(this, substring); 1883 } 1884 1885 1888 public boolean isCompoundExpression() { 1889 return false; 1890 } 1891 1892 1895 public boolean isConstantExpression() { 1896 return false; 1897 } 1898 1899 1902 public boolean isDataExpression() { 1903 return false; 1904 } 1905 1906 1921 public Expression isEmpty(String attributeName) { 1922 return size(attributeName).equal(0); 1923 } 1924 1925 1928 public boolean isExpressionBuilder() { 1929 return false; 1930 } 1931 1932 1935 public boolean isFieldExpression() { 1936 return false; 1937 } 1938 1939 1942 public boolean isFunctionExpression() { 1943 return false; 1944 } 1945 1946 1949 public boolean isLiteralExpression() { 1950 return false; 1951 } 1952 1953 1956 public boolean isLogicalExpression() { 1957 return false; 1958 } 1959 1960 1964 public Expression isNull() { 1965 ExpressionOperator anOperator = getOperator(ExpressionOperator.IsNull); 1966 return anOperator.expressionFor(this); 1967 } 1968 1969 1972 public boolean isObjectExpression() { 1973 return false; 1974 } 1975 1976 1979 public boolean isParameterExpression() { 1980 return false; 1981 } 1982 1983 1986 public boolean isQueryKeyExpression() { 1987 return false; 1988 } 1989 1990 1993 public boolean isRelationExpression() { 1994 return false; 1995 } 1996 1997 2000 public boolean isTableExpression() { 2001 return false; 2002 } 2003 2004 2008 public boolean isValueExpression() { 2009 return false; 2010 } 2011 2012 2016 public void iterateOn(ExpressionIterator iterator) { 2017 iterator.iterate(this); 2018 } 2019 2020 2024 public Expression lastDay() { 2025 ExpressionOperator anOperator = getOperator(ExpressionOperator.LastDay); 2026 return anOperator.expressionFor(this); 2027 } 2028 2029 2033 public Expression leftPad(int size, Object substring) { 2034 return leftPad(new Integer (size), substring); 2035 } 2036 2037 2041 public Expression leftPad(Object size, Object substring) { 2042 ExpressionOperator anOperator = getOperator(ExpressionOperator.LeftPad); 2043 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 2044 args.addElement(size); 2045 args.addElement(substring); 2046 return anOperator.expressionForArguments(this, args); 2047 } 2048 2049 2053 public Expression leftTrim() { 2054 ExpressionOperator anOperator = getOperator(ExpressionOperator.LeftTrim); 2055 return anOperator.expressionFor(this); 2056 } 2057 2058 2062 public Expression leftTrim(Object substring) { 2063 ExpressionOperator anOperator = getOperator(ExpressionOperator.LeftTrim2); 2064 return anOperator.expressionFor(this, substring); 2065 } 2066 2067 2071 public Expression length() { 2072 ExpressionOperator anOperator = getOperator(ExpressionOperator.Length); 2073 return anOperator.expressionFor(this); 2074 } 2075 2076 2081 public Expression lessThan(byte theValue) { 2082 return lessThan(new Byte (theValue)); 2083 } 2084 2085 2090 public Expression lessThan(char theChar) { 2091 return lessThan(new Character (theChar)); 2092 } 2093 2094 2099 public Expression lessThan(double theValue) { 2100 return lessThan(new Double (theValue)); 2101 } 2102 2103 2108 public Expression lessThan(float theValue) { 2109 return lessThan(new Float (theValue)); 2110 } 2111 2112 2117 public Expression lessThan(int theValue) { 2118 return lessThan(new Integer (theValue)); 2119 } 2120 2121 2126 public Expression lessThan(long theValue) { 2127 return lessThan(new Long (theValue)); 2128 } 2129 2130 2135 public Expression lessThan(Object theValue) { 2136 ExpressionOperator anOperator = getOperator(ExpressionOperator.LessThan); 2137 return anOperator.expressionFor(this, theValue); 2138 } 2139 2140 public Expression lessThan(Expression theValue) { 2141 ExpressionOperator anOperator = getOperator(ExpressionOperator.LessThan); 2142 return anOperator.expressionFor(this, theValue); 2143 2144 } 2145 2146 2151 public Expression lessThan(short theValue) { 2152 return lessThan(new Short (theValue)); 2153 } 2154 2155 2160 public Expression lessThan(boolean theBoolean) { 2161 return lessThan(new Boolean (theBoolean)); 2162 } 2163 2164 2169 public Expression lessThanEqual(byte theValue) { 2170 return lessThanEqual(new Byte (theValue)); 2171 } 2172 2173 2178 public Expression lessThanEqual(char theChar) { 2179 return lessThanEqual(new Character (theChar)); 2180 } 2181 2182 2187 public Expression lessThanEqual(double theValue) { 2188 return lessThanEqual(new Double (theValue)); 2189 } 2190 2191 2196 public Expression lessThanEqual(float theValue) { 2197 return lessThanEqual(new Float (theValue)); 2198 } 2199 2200 2205 public Expression lessThanEqual(int theValue) { 2206 return lessThanEqual(new Integer (theValue)); 2207 } 2208 2209 2214 public Expression lessThanEqual(long theValue) { 2215 return lessThanEqual(new Long (theValue)); 2216 } 2217 2218 2223 public Expression lessThanEqual(Object theValue) { 2224 ExpressionOperator anOperator = getOperator(ExpressionOperator.LessThanEqual); 2225 return anOperator.expressionFor(this, theValue); 2226 } 2227 2228 2233 public Expression lessThanEqual(Expression theValue) { 2234 ExpressionOperator anOperator = getOperator(ExpressionOperator.LessThanEqual); 2235 return anOperator.expressionFor(this, theValue); 2236 2237 } 2238 2239 2244 public Expression lessThanEqual(short theValue) { 2245 return lessThanEqual(new Short (theValue)); 2246 } 2247 2248 2253 public Expression lessThanEqual(boolean theBoolean) { 2254 return lessThanEqual(new Boolean (theBoolean)); 2255 } 2256 2257 2270 public Expression like(String value) { 2271 return like(new ConstantExpression(value, this)); 2272 } 2273 2274 2289 public Expression like(String value, String escapeSequence) { 2290 ExpressionOperator anOperator = getOperator(ExpressionOperator.LikeEscape); 2291 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2292 args.addElement(value); 2293 args.addElement(escapeSequence); 2294 return anOperator.expressionForArguments(this, args); 2295 } 2296 2297 2310 public Expression like(Expression argument) { 2311 ExpressionOperator anOperator = getOperator(ExpressionOperator.Like); 2312 return anOperator.expressionFor(this, argument); 2313 } 2314 2315 2330 public Expression like(Expression value, Expression escapeSequence) { 2331 ExpressionOperator anOperator = getOperator(ExpressionOperator.LikeEscape); 2332 Vector args = new Vector(); 2333 args.addElement(value); 2334 args.addElement(escapeSequence); 2335 return anOperator.expressionForArguments(this, args); 2336 } 2337 2338 2349 public Expression likeIgnoreCase(String theValue) { 2350 return toUpperCase().like(theValue.toUpperCase()); 2351 } 2352 2353 2358 public Expression likeIgnoreCase(Expression theValue) { 2359 return toUpperCase().like(theValue.toUpperCase()); 2360 } 2361 2362 2376 public Expression locate(Object str) { 2377 ExpressionOperator anOperator = getOperator(ExpressionOperator.Locate); 2378 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1); 2379 args.addElement(str); 2380 return anOperator.expressionForArguments(this, args); 2381 } 2382 2383 2398 public Expression locate(String str, int fromIndex) { 2399 return locate(str, new Integer (fromIndex)); 2400 } 2401 2402 2417 public Expression locate(Object str, Object fromIndex) { 2418 ExpressionOperator anOperator = getOperator(ExpressionOperator.Locate2); 2419 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 2420 args.addElement(str); 2421 args.addElement(fromIndex); 2422 return anOperator.expressionForArguments(this, args); 2423 } 2424 2425 2429 public Expression maximum() { 2430 return getFunction(ExpressionOperator.Maximum); 2431 } 2432 2433 2437 public Expression minimum() { 2438 return getFunction(ExpressionOperator.Minimum); 2439 } 2440 2441 2445 public Expression monthsBetween(Object otherDate) { 2446 ExpressionOperator anOperator = getOperator(ExpressionOperator.MonthsBetween); 2447 return anOperator.expressionFor(this, otherDate); 2448 } 2449 2450 2460 public Expression newTime(String timeZoneFrom, String timeZoneTo) { 2461 ExpressionOperator anOperator = getOperator(ExpressionOperator.NewTime); 2462 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2463 args.addElement(timeZoneFrom); 2464 args.addElement(timeZoneTo); 2465 return anOperator.expressionForArguments(this, args); 2466 } 2467 2468 2472 public Expression nextDay(Object dayName) { 2473 ExpressionOperator anOperator = getOperator(ExpressionOperator.NextDay); 2474 return anOperator.expressionFor(this, dayName); 2475 } 2476 2477 2524 public Expression noneOf(String attributeName, Expression criteria) { 2525 ReportQuery subQuery = new ReportQuery(); 2526 subQuery.setShouldRetrieveFirstPrimaryKey(true); 2527 Expression builder = criteria.getBuilder(); 2528 criteria = builder.equal(anyOf(attributeName)).and(criteria); 2529 subQuery.setSelectionCriteria(criteria); 2530 return notExists(subQuery); 2531 } 2532 2533 2538 public Expression normalize(ExpressionNormalizer normalizer) { 2539 validateNode(); 2543 return this; 2544 } 2545 2546 2557 public Expression not() { 2558 ExpressionOperator anOperator = getOperator(ExpressionOperator.Not); 2559 return anOperator.expressionFor(this); 2560 } 2561 2562 2568 public Expression notBetween(byte leftValue, byte rightValue) { 2569 return notBetween(new Byte (leftValue), new Byte (rightValue)); 2570 } 2571 2572 2578 public Expression notBetween(char leftChar, char rightChar) { 2579 return notBetween(new Character (leftChar), new Character (rightChar)); 2580 } 2581 2582 2588 public Expression notBetween(double leftValue, double rightValue) { 2589 return notBetween(new Double (leftValue), new Double (rightValue)); 2590 } 2591 2592 2598 public Expression notBetween(float leftValue, float rightValue) { 2599 return notBetween(new Float (leftValue), new Float (rightValue)); 2600 } 2601 2602 2608 public Expression notBetween(int leftValue, int rightValue) { 2609 return notBetween(new Integer (leftValue), new Integer (rightValue)); 2610 } 2611 2612 2618 public Expression notBetween(long leftValue, long rightValue) { 2619 return notBetween(new Long (leftValue), new Long (rightValue)); 2620 } 2621 2622 2628 public Expression notBetween(Object leftValue, Object rightValue) { 2629 return between(leftValue, rightValue).not(); 2630 } 2631 2632 2638 public Expression notBetween(Expression leftExpression, Expression rightExpression) { 2639 return between(leftExpression, rightExpression).not(); 2640 } 2641 2642 2648 public Expression notBetween(short leftValue, short rightValue) { 2649 return notBetween(new Short (leftValue), new Short (rightValue)); 2650 } 2651 2652 2667 public Expression notEmpty(String attributeName) { 2668 return size(attributeName).greaterThan(0); 2669 } 2670 2671 2678 public Expression notEqual(byte theValue) { 2679 return notEqual(new Byte (theValue)); 2680 } 2681 2682 2689 public Expression notEqual(char theChar) { 2690 return notEqual(new Character (theChar)); 2691 } 2692 2693 2700 public Expression notEqual(double theValue) { 2701 return notEqual(new Double (theValue)); 2702 } 2703 2704 2711 public Expression notEqual(float theValue) { 2712 return notEqual(new Float (theValue)); 2713 } 2714 2715 2722 public Expression notEqual(int theValue) { 2723 return notEqual(new Integer (theValue)); 2724 } 2725 2726 2733 public Expression notEqual(long theValue) { 2734 return notEqual(new Long (theValue)); 2735 } 2736 2737 2744 public Expression notEqual(Object theValue) { 2745 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotEqual); 2746 return anOperator.expressionFor(this, theValue); 2747 } 2748 2749 2756 public Expression notEqual(Expression theValue) { 2757 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotEqual); 2758 return anOperator.expressionFor(this, theValue); 2759 } 2760 2761 2768 public Expression notEqual(short theValue) { 2769 return notEqual(new Short (theValue)); 2770 } 2771 2772 2779 public Expression notEqual(boolean theBoolean) { 2780 return notEqual(new Boolean (theBoolean)); 2781 } 2782 2783 2796 public Expression notExists(ReportQuery subQuery) { 2797 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotExists); 2798 return anOperator.expressionFor(subQuery(subQuery)); 2799 } 2800 2801 2806 public Expression notIn(byte[] theBytes) { 2807 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2808 2809 for (int index = 0; index < theBytes.length; index++) { 2810 vector.addElement(new Byte (theBytes[index])); 2811 } 2812 2813 return notIn(vector); 2814 } 2815 2816 2821 public Expression notIn(char[] theChars) { 2822 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2823 2824 for (int index = 0; index < theChars.length; index++) { 2825 vector.addElement(new Character (theChars[index])); 2826 } 2827 2828 return notIn(vector); 2829 } 2830 2831 2836 public Expression notIn(double[] theDoubles) { 2837 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2838 2839 for (int index = 0; index < theDoubles.length; index++) { 2840 vector.addElement(new Double (theDoubles[index])); 2841 } 2842 2843 return notIn(vector); 2844 } 2845 2846 2851 public Expression notIn(float[] theFloats) { 2852 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2853 2854 for (int index = 0; index < theFloats.length; index++) { 2855 vector.addElement(new Float (theFloats[index])); 2856 } 2857 2858 return notIn(vector); 2859 } 2860 2861 2866 public Expression notIn(int[] theInts) { 2867 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2868 2869 for (int index = 0; index < theInts.length; index++) { 2870 vector.addElement(new Integer (theInts[index])); 2871 } 2872 2873 return notIn(vector); 2874 } 2875 2876 2881 public Expression notIn(long[] theLongs) { 2882 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2883 2884 for (int index = 0; index < theLongs.length; index++) { 2885 vector.addElement(new Long (theLongs[index])); 2886 } 2887 2888 return notIn(vector); 2889 } 2890 2891 2896 public Expression notIn(Object [] theObjects) { 2897 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2898 2899 for (int index = 0; index < theObjects.length; index++) { 2900 vector.addElement(theObjects[index]); 2901 } 2902 2903 return notIn(vector); 2904 } 2905 2906 public Expression notIn(ReportQuery subQuery) { 2907 return notIn(subQuery(subQuery)); 2908 } 2909 2910 2915 public Expression notIn(short[] theShorts) { 2916 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2917 2918 for (int index = 0; index < theShorts.length; index++) { 2919 vector.addElement(new Short (theShorts[index])); 2920 } 2921 2922 return notIn(vector); 2923 } 2924 2925 2930 public Expression notIn(boolean[] theBooleans) { 2931 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 2932 2933 for (int index = 0; index < theBooleans.length; index++) { 2934 vector.addElement(new Boolean (theBooleans[index])); 2935 } 2936 2937 return notIn(vector); 2938 } 2939 2940 2952 public Expression notIn(Vector theObjects) { 2953 if (!detectExpression(theObjects)) { 2955 return notIn(new ConstantExpression(theObjects, this)); 2956 } 2957 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotIn); 2959 return anOperator.expressionForArguments(this, theObjects); 2960 } 2961 2962 public Expression notIn(Expression arguments) { 2963 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotIn); 2964 return anOperator.expressionFor(this, arguments); 2965 } 2966 2967 2973 public Expression notLike(String aString) { 2974 return notLike(new ConstantExpression(aString, this)); 2975 } 2976 2977 2983 public Expression notLike(Expression arguments) { 2984 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotLike); 2985 return anOperator.expressionFor(this, arguments); 2986 } 2987 2988 2998 public Expression notNull() { 2999 ExpressionOperator anOperator = getOperator(ExpressionOperator.NotNull); 3000 return anOperator.expressionFor(this); 3001 } 3002 3003 3014 public Expression or(Expression theExpression) { 3015 if (theExpression == null) { 3017 return this; 3018 } 3019 3020 ExpressionBuilder base = getBuilder(); 3021 Expression expressionToUse = theExpression; 3022 3023 if ((theExpression.getBuilder() != base) && (theExpression.getBuilder().getQueryClass() == null)) { 3025 expressionToUse = theExpression.rebuildOn(base); 3026 } 3027 3028 if (base == this) { return expressionToUse; 3030 } 3031 3032 ExpressionOperator anOperator = getOperator(ExpressionOperator.Or); 3033 return anOperator.expressionFor(this, expressionToUse); 3034 } 3035 3036 3039 public Expression performOperator(ExpressionOperator anOperator, Vector args) { 3040 return anOperator.expressionForArguments(this, args); 3041 } 3042 3043 protected void postCopyIn(Dictionary alreadyDone) { 3044 } 3045 3046 3052 public Expression postfixSQL(String sqlString) { 3053 ExpressionOperator anOperator = new ExpressionOperator(); 3054 anOperator.setType(ExpressionOperator.FunctionOperator); 3055 Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1); 3056 v.addElement(sqlString); 3057 anOperator.printsAs(v); 3058 anOperator.bePostfix(); 3059 anOperator.setNodeClass(ClassConstants.FunctionExpression_Class); 3060 3061 return anOperator.expressionFor(this); 3062 } 3063 3064 3070 public Expression prefixSQL(String sqlString) { 3071 ExpressionOperator anOperator = new ExpressionOperator(); 3072 anOperator.setType(ExpressionOperator.FunctionOperator); 3073 Vector v = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(1); 3074 v.addElement(sqlString); 3075 anOperator.printsAs(v); 3076 anOperator.bePrefix(); 3077 anOperator.setNodeClass(ClassConstants.FunctionExpression_Class); 3078 3079 return anOperator.expressionFor(this); 3080 } 3081 3082 3086 public abstract void printSQL(ExpressionSQLPrinter printer); 3087 3088 3092 public void printJava(ExpressionJavaPrinter printer) { 3093 } 3095 3096 3100 public void printSQLWithoutConversion(ExpressionSQLPrinter printer) { 3101 printSQL(printer); 3102 } 3103 3104 3111 public abstract Expression rebuildOn(Expression newBase); 3112 3113 3117 public Expression ref() { 3118 return getFunction(ExpressionOperator.Ref); 3119 } 3120 3121 protected Expression registerIn(Dictionary alreadyDone) { 3122 Expression copy = (Expression)shallowClone(); 3123 alreadyDone.put(this, copy); 3124 copy.postCopyIn(alreadyDone); 3125 return copy; 3126 3127 } 3128 3129 3133 public Expression replace(Object stringToReplace, Object stringToReplaceWith) { 3134 ExpressionOperator anOperator = getOperator(ExpressionOperator.Replace); 3135 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 3136 args.addElement(stringToReplace); 3137 args.addElement(stringToReplaceWith); 3138 return anOperator.expressionForArguments(this, args); 3139 } 3140 3141 3152 public Expression replicate(int constant) { 3153 return replicate(new Integer (constant)); 3154 } 3155 3156 3167 public Expression replicate(Object theValue) { 3168 ExpressionOperator anOperator = getOperator(ExpressionOperator.Replicate); 3169 return anOperator.expressionFor(this, theValue); 3170 } 3171 3172 3175 protected void resetCache() { 3176 } 3177 3178 3189 public Expression reverse() { 3190 return getFunction(ExpressionOperator.Reverse); 3191 } 3192 3193 3204 public Expression right(int characters) { 3205 return right(new Integer (characters)); 3206 } 3207 3208 3219 public Expression right(Object characters) { 3220 ExpressionOperator anOperator = getOperator(ExpressionOperator.Right); 3221 return anOperator.expressionFor(this, characters); 3222 } 3223 3224 3228 public Expression rightPad(int size, Object substring) { 3229 return rightPad(new Integer (size), substring); 3230 } 3231 3232 3236 public Expression rightPad(Object size, Object substring) { 3237 ExpressionOperator anOperator = getOperator(ExpressionOperator.RightPad); 3238 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 3239 args.addElement(size); 3240 args.addElement(substring); 3241 return anOperator.expressionForArguments(this, args); 3242 } 3243 3244 3248 public Expression rightTrim() { 3249 ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim); 3250 return anOperator.expressionFor(this); 3251 } 3252 3253 3257 public Expression rightTrim(Object substring) { 3258 ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim2); 3259 return anOperator.expressionFor(this, substring); 3260 } 3261 3262 3266 public Expression roundDate(Object yearOrMonthOrDayRoundToken) { 3267 ExpressionOperator anOperator = getOperator(ExpressionOperator.RoundDate); 3268 return anOperator.expressionFor(this, yearOrMonthOrDayRoundToken); 3269 } 3270 3271 3276 public boolean selectIfOrderedBy() { 3277 return selectIfOrderedBy; 3278 } 3279 3280 3285 public void setLocalBase(Expression exp) { 3286 } 3287 3288 3295 public void setSelectIfOrderedBy(boolean selectIfOrderedBy) { 3296 this.selectIfOrderedBy = selectIfOrderedBy; 3297 } 3298 3299 3302 public Expression shallowClone() { 3303 Expression result = null; 3304 try { 3305 result = (Expression)super.clone(); 3306 } catch (CloneNotSupportedException e) { 3307 } 3308 ; 3309 return result; 3310 } 3311 3312 3324 public Expression size(String attributeName) { 3325 ReportQuery subQuery = new ReportQuery(); 3328 subQuery.addCount(); 3329 subQuery.setSelectionCriteria(subQuery.getExpressionBuilder().equal(this.anyOf(attributeName))); 3330 return subQuery(subQuery); 3331 } 3332 3333 3337 public Expression standardDeviation() { 3338 return getFunction(ExpressionOperator.StandardDeviation); 3339 } 3340 3341 3354 public Expression subQuery(ReportQuery subQuery) { 3355 return new SubSelectExpression(subQuery, this); 3356 } 3357 3358 3362 public Expression substring(int startPosition, int size) { 3363 return substring(new Integer (startPosition), new Integer (size)); 3364 } 3365 3366 3370 public Expression substring(Object startPosition, Object size) { 3371 ExpressionOperator anOperator = getOperator(ExpressionOperator.Substring); 3372 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 3373 args.addElement(startPosition); 3374 args.addElement(size); 3375 return anOperator.expressionForArguments(this, args); 3376 } 3377 3378 3382 public Expression sum() { 3383 return getFunction(ExpressionOperator.Sum); 3384 } 3385 3386 3390 public Expression toCharacter() { 3391 ExpressionOperator anOperator = getOperator(ExpressionOperator.Chr); 3392 return anOperator.expressionFor(this); 3393 } 3394 3395 3399 public Expression toDate() { 3400 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToDate); 3401 return anOperator.expressionFor(this); 3402 } 3403 3404 3415 public Expression toChar() { 3416 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToChar); 3417 return anOperator.expressionFor(this); 3418 } 3419 3420 3432 public Expression toChar(String format) { 3433 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToCharWithFormat); 3434 return anOperator.expressionFor(this, format); 3435 } 3436 3437 3449 public Expression toLowerCase() { 3450 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToLowerCase); 3451 return anOperator.expressionFor(this); 3452 } 3453 3454 3458 public Expression toNumber() { 3459 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToNumber); 3460 return anOperator.expressionFor(this); 3461 } 3462 3463 3467 public String toString() { 3468 try { 3469 StringWriter innerWriter = new StringWriter(); 3470 BufferedWriter outerWriter = new BufferedWriter(innerWriter); 3471 toString(outerWriter, 0); 3472 outerWriter.flush(); 3473 return innerWriter.toString(); 3474 } catch (IOException e) { 3475 return ToStringLocalization.buildMessage("error_printing_expression", (Object [])null); 3476 } 3477 } 3478 3479 3483 public void toString(BufferedWriter writer, int indent) throws IOException { 3484 writer.newLine(); 3485 for (int i = 0; i < indent; i++) { 3486 writer.write(" "); 3487 } 3488 writer.write(descriptionOfNodeType()); 3489 writer.write(" "); 3490 writeDescriptionOn(writer); 3491 writeSubexpressionsTo(writer, indent + 1); 3492 } 3493 3494 3506 public Expression toUpperCase() { 3507 ExpressionOperator anOperator = getOperator(ExpressionOperator.ToUpperCase); 3508 return anOperator.expressionFor(this); 3509 } 3510 3511 3515 public Expression toUppercaseCasedWords() { 3516 ExpressionOperator anOperator = getOperator(ExpressionOperator.Initcap); 3517 return anOperator.expressionFor(this); 3518 } 3519 3520 3524 public Expression translate(Object fromString, Object toString) { 3525 ExpressionOperator anOperator = getOperator(ExpressionOperator.Translate); 3526 Vector args = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(2); 3527 args.addElement(fromString); 3528 args.addElement(toString); 3529 return anOperator.expressionForArguments(this, args); 3530 } 3531 3532 3536 public Expression trim() { 3537 ExpressionOperator anOperator = getOperator(ExpressionOperator.Trim); 3538 return anOperator.expressionFor(this); 3539 } 3540 3541 3545 public Expression trim(Object substring) { 3546 ExpressionOperator anOperator = getOperator(ExpressionOperator.Trim2); 3547 return anOperator.expressionForWithBaseLast(this, substring); 3548 } 3549 3550 3555 public Expression extract(String path) { 3556 ExpressionOperator anOperator = getOperator(ExpressionOperator.Extract); 3557 return anOperator.expressionFor(this, path); 3558 } 3559 3560 3565 public Expression extractValue(String path) { 3566 ExpressionOperator anOperator = getOperator(ExpressionOperator.ExtractValue); 3567 return anOperator.expressionFor(this, path); 3568 } 3569 3570 3576 public Expression existsNode(String path) { 3577 ExpressionOperator anOperator = getOperator(ExpressionOperator.ExistsNode); 3578 return anOperator.expressionFor(this, path); 3579 } 3580 3581 3586 public Expression isFragment() { 3587 ExpressionOperator anOperator = getOperator(ExpressionOperator.IsFragment); 3588 return anOperator.expressionFor(this); 3589 } 3590 3591 3595 public Expression getStringVal() { 3596 ExpressionOperator anOperator = getOperator(ExpressionOperator.GetStringVal); 3597 return anOperator.expressionFor(this); 3598 } 3599 3600 3604 public Expression getNumberVal() { 3605 ExpressionOperator anOperator = getOperator(ExpressionOperator.GetNumberVal); 3606 return anOperator.expressionFor(this); 3607 } 3608 3609 3619 public Expression truncateDate(String datePart) { 3620 ExpressionOperator anOperator = getOperator(ExpressionOperator.TruncateDate); 3621 return anOperator.expressionFor(this, datePart); 3622 3623 } 3624 3625 3644 public Expression twist(Expression expression, Expression newBase) { 3645 if (expression == null) { 3646 return null; 3647 } 3648 return expression.twistedForBaseAndContext(newBase, this); 3649 3650 } 3651 3652 3659 public Expression twistedForBaseAndContext(Expression newBase, Expression context) { 3660 return this; 3662 } 3663 3664 3668 public void validateNode() { 3669 } 3670 3671 3675 public Expression value() { 3676 ExpressionOperator anOperator = getOperator(ExpressionOperator.Value); 3677 return anOperator.expressionFor(this); 3678 } 3679 3680 3688 public Expression value(byte constant) { 3689 return value(new Byte (constant)); 3690 } 3691 3692 3700 public Expression value(char constant) { 3701 return value(new Character (constant)); 3702 } 3703 3704 3712 public Expression value(double constant) { 3713 return value(new Double (constant)); 3714 } 3715 3716 3724 public Expression value(float constant) { 3725 return value(new Float (constant)); 3726 } 3727 3728 3736 public Expression value(int constant) { 3737 return value(new Integer (constant)); 3738 } 3739 3740 3748 public Expression value(long constant) { 3749 return value(new Long (constant)); 3750 } 3751 3752 3760 public Expression value(Object constant) { 3761 return new ConstantExpression(constant, this); 3762 } 3763 3764 3772 public Expression value(short constant) { 3773 return value(new Short (constant)); 3774 } 3775 3776 3784 public Expression value(boolean constant) { 3785 return value(new Boolean (constant)); 3786 } 3787 3788 3798 public Expression literal(String literal) { 3799 return new LiteralExpression(literal, this); 3800 } 3801 3802 3810 public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean isObjectUnregistered) { 3811 throw QueryException.cannotConformExpression(); 3812 } 3813 3814 3819 public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy) { 3820 return valueFromObject(object, session, translationRow, valueHolderPolicy, false); 3821 } 3822 3823 3827 public Expression variance() { 3828 return getFunction(ExpressionOperator.Variance); 3829 } 3830 3831 3835 public void writeDescriptionOn(BufferedWriter writer) throws IOException { 3836 writer.write("some expression"); 3837 } 3838 3839 3843 protected void writeField(ExpressionSQLPrinter printer, DatabaseField field, SQLSelectStatement statement) { 3844 if (printer.isFirstElementPrinted()) { 3846 printer.printString(", "); 3847 } else { 3848 printer.setIsFirstElementPrinted(true); 3849 } 3850 3851 if (statement.requiresAliases()) { 3852 if (field.getTable() != lastTable) { 3853 lastTable = field.getTable(); 3854 currentAlias = aliasForTable(lastTable); 3855 } 3856 printer.printString(currentAlias.getQualifiedName()); 3857 printer.printString("."); 3858 printer.printString(field.getName()); 3859 } else { 3860 printer.printString(field.getName()); 3861 } 3862 } 3863 3864 3868 public void writeFields(ExpressionSQLPrinter printer, Vector newFields, SQLSelectStatement statement) { 3869 for (Enumeration fieldsEnum = getFields().elements(); fieldsEnum.hasMoreElements();) { 3870 DatabaseField field = (DatabaseField)fieldsEnum.nextElement(); 3871 newFields.addElement(field); 3872 writeField(printer, field, statement); 3873 } 3874 } 3875 3876 3880 public void writeSubexpressionsTo(BufferedWriter writer, int indent) throws IOException { 3881 } 3883 3884 3892 public Expression any(byte[] theBytes) { 3893 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3894 3895 for (int index = 0; index < theBytes.length; index++) { 3896 vector.addElement(new Byte (theBytes[index])); 3897 } 3898 3899 return any(vector); 3900 } 3901 3902 3907 public Expression any(char[] theChars) { 3908 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3909 3910 for (int index = 0; index < theChars.length; index++) { 3911 vector.addElement(new Character (theChars[index])); 3912 } 3913 3914 return any(vector); 3915 } 3916 3917 3922 public Expression any(double[] theDoubles) { 3923 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3924 3925 for (int index = 0; index < theDoubles.length; index++) { 3926 vector.addElement(new Double (theDoubles[index])); 3927 } 3928 3929 return any(vector); 3930 } 3931 3932 3937 public Expression any(float[] theFloats) { 3938 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3939 3940 for (int index = 0; index < theFloats.length; index++) { 3941 vector.addElement(new Float (theFloats[index])); 3942 } 3943 3944 return any(vector); 3945 } 3946 3947 3952 public Expression any(int[] theInts) { 3953 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3954 3955 for (int index = 0; index < theInts.length; index++) { 3956 vector.addElement(new Integer (theInts[index])); 3957 } 3958 3959 return any(vector); 3960 } 3961 3962 3967 public Expression any(long[] theLongs) { 3968 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3969 3970 for (int index = 0; index < theLongs.length; index++) { 3971 vector.addElement(new Long (theLongs[index])); 3972 } 3973 3974 return any(vector); 3975 } 3976 3977 3982 public Expression any(Object [] theObjects) { 3983 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3984 3985 for (int index = 0; index < theObjects.length; index++) { 3986 vector.addElement(theObjects[index]); 3987 } 3988 3989 return any(vector); 3990 } 3991 3992 3997 public Expression any(short[] theShorts) { 3998 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 3999 4000 for (int index = 0; index < theShorts.length; index++) { 4001 vector.addElement(new Short (theShorts[index])); 4002 } 4003 4004 return any(vector); 4005 } 4006 4007 4012 public Expression any(boolean[] theBooleans) { 4013 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4014 4015 for (int index = 0; index < theBooleans.length; index++) { 4016 vector.addElement(new Boolean (theBooleans[index])); 4017 } 4018 4019 return any(vector); 4020 } 4021 4022 4033 public Expression any(Vector theObjects) { 4034 return any(new ConstantExpression(theObjects, this)); 4035 } 4036 4037 public Expression any(Expression arguments) { 4038 ExpressionOperator anOperator = getOperator(ExpressionOperator.Any); 4039 return anOperator.expressionFor(this, arguments); 4040 } 4041 4042 public Expression any(ReportQuery subQuery) { 4043 return any(subQuery(subQuery)); 4044 } 4045 4046 4054 public Expression some(byte[] theBytes) { 4055 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4056 4057 for (int index = 0; index < theBytes.length; index++) { 4058 vector.addElement(new Byte (theBytes[index])); 4059 } 4060 4061 return some(vector); 4062 } 4063 4064 4069 public Expression some(char[] theChars) { 4070 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4071 4072 for (int index = 0; index < theChars.length; index++) { 4073 vector.addElement(new Character (theChars[index])); 4074 } 4075 4076 return some(vector); 4077 } 4078 4079 4084 public Expression some(double[] theDoubles) { 4085 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4086 4087 for (int index = 0; index < theDoubles.length; index++) { 4088 vector.addElement(new Double (theDoubles[index])); 4089 } 4090 4091 return some(vector); 4092 } 4093 4094 4099 public Expression some(float[] theFloats) { 4100 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4101 4102 for (int index = 0; index < theFloats.length; index++) { 4103 vector.addElement(new Float (theFloats[index])); 4104 } 4105 4106 return some(vector); 4107 } 4108 4109 4114 public Expression some(int[] theInts) { 4115 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4116 4117 for (int index = 0; index < theInts.length; index++) { 4118 vector.addElement(new Integer (theInts[index])); 4119 } 4120 4121 return some(vector); 4122 } 4123 4124 4129 public Expression some(long[] theLongs) { 4130 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4131 4132 for (int index = 0; index < theLongs.length; index++) { 4133 vector.addElement(new Long (theLongs[index])); 4134 } 4135 4136 return some(vector); 4137 } 4138 4139 4144 public Expression some(Object [] theObjects) { 4145 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4146 4147 for (int index = 0; index < theObjects.length; index++) { 4148 vector.addElement(theObjects[index]); 4149 } 4150 4151 return some(vector); 4152 } 4153 4154 4159 public Expression some(short[] theShorts) { 4160 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4161 4162 for (int index = 0; index < theShorts.length; index++) { 4163 vector.addElement(new Short (theShorts[index])); 4164 } 4165 4166 return some(vector); 4167 } 4168 4169 4174 public Expression some(boolean[] theBooleans) { 4175 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4176 4177 for (int index = 0; index < theBooleans.length; index++) { 4178 vector.addElement(new Boolean (theBooleans[index])); 4179 } 4180 4181 return some(vector); 4182 } 4183 4184 4195 public Expression some(Vector theObjects) { 4196 return some(new ConstantExpression(theObjects, this)); 4197 } 4198 4199 public Expression some(Expression arguments) { 4200 ExpressionOperator anOperator = getOperator(ExpressionOperator.Some); 4201 return anOperator.expressionFor(this, arguments); 4202 } 4203 4204 public Expression some(ReportQuery subQuery) { 4205 return some(subQuery(subQuery)); 4206 } 4207 4208 4216 public Expression all(byte[] theBytes) { 4217 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4218 4219 for (int index = 0; index < theBytes.length; index++) { 4220 vector.addElement(new Byte (theBytes[index])); 4221 } 4222 4223 return all(vector); 4224 } 4225 4226 4231 public Expression all(char[] theChars) { 4232 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4233 4234 for (int index = 0; index < theChars.length; index++) { 4235 vector.addElement(new Character (theChars[index])); 4236 } 4237 4238 return all(vector); 4239 } 4240 4241 4246 public Expression all(double[] theDoubles) { 4247 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4248 4249 for (int index = 0; index < theDoubles.length; index++) { 4250 vector.addElement(new Double (theDoubles[index])); 4251 } 4252 4253 return all(vector); 4254 } 4255 4256 4261 public Expression all(float[] theFloats) { 4262 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4263 4264 for (int index = 0; index < theFloats.length; index++) { 4265 vector.addElement(new Float (theFloats[index])); 4266 } 4267 4268 return all(vector); 4269 } 4270 4271 4276 public Expression all(int[] theInts) { 4277 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4278 4279 for (int index = 0; index < theInts.length; index++) { 4280 vector.addElement(new Integer (theInts[index])); 4281 } 4282 4283 return all(vector); 4284 } 4285 4286 4291 public Expression all(long[] theLongs) { 4292 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4293 4294 for (int index = 0; index < theLongs.length; index++) { 4295 vector.addElement(new Long (theLongs[index])); 4296 } 4297 4298 return all(vector); 4299 } 4300 4301 4306 public Expression all(Object [] theObjects) { 4307 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4308 4309 for (int index = 0; index < theObjects.length; index++) { 4310 vector.addElement(theObjects[index]); 4311 } 4312 4313 return all(vector); 4314 } 4315 4316 4321 public Expression all(short[] theShorts) { 4322 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4323 4324 for (int index = 0; index < theShorts.length; index++) { 4325 vector.addElement(new Short (theShorts[index])); 4326 } 4327 4328 return all(vector); 4329 } 4330 4331 4336 public Expression all(boolean[] theBooleans) { 4337 Vector vector = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(); 4338 4339 for (int index = 0; index < theBooleans.length; index++) { 4340 vector.addElement(new Boolean (theBooleans[index])); 4341 } 4342 4343 return all(vector); 4344 } 4345 4346 4357 public Expression all(Vector theObjects) { 4358 return all(new ConstantExpression(theObjects, this)); 4359 } 4360 4361 public Expression all(Expression arguments) { 4362 ExpressionOperator anOperator = getOperator(ExpressionOperator.All); 4363 return anOperator.expressionFor(this, arguments); 4364 } 4365 4366 public Expression all(ReportQuery subQuery) { 4367 return all(subQuery(subQuery)); 4368 } 4369} | Popular Tags |