Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.expressions
Class Expression

`java.lang.Object
oracle.toplink.expressions.Expression`

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public abstract class Expression
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Purpose: Define an object-level representation of a database query where clause.

Description: An expression is a tree-like structure that defines the selection criteria for a query against objects in the database. The expression has the advantage over SQL by being at the object-level, i.e. the object model attributes and relationships can be used to be query on instead of the database field names. Because it is an object, not a string the expression has the advantage that is can be easily manipulated through code to easily build complex selection criterias.

Responsibilities:

- Store the selection criteria in a tree-like structure.
- Support public manipulation protocols for all comparison and function opperators.
- Use opperator overloading to support all primitive types as well as objects.

See Also:
  Serialized Form

Constructor Summary
`Expression()` Base Expression Constructor.

Method Summary
`Expression` | `addDate(java.lang.String datePart, int numberToAdd)` PUBLIC: Function, return an expression that adds to a date based on the specified datePart.
`Expression` | `addDate(java.lang.String datePart, java.lang.Object numberToAdd)` PUBLIC: Function, return an expression that adds to a date based on the specified datePart.
`Expression` | `addMonths(int months)` PUBLIC: Function, to add months to a date.
`Expression` | `addMonths(java.lang.Object months)` PUBLIC: Function, to add months to a date.
`Expression` | `allOf(java.lang.String attributeName, Expression criteria)` PUBLIC: Returns an expression equivalent to all of `attributeName` holding true for `criteria`.
`Expression` | `and(Expression theExpression)` PUBLIC: Return an expression that is the boolean logical combination of both expressions.
`Expression` | `anyOf(java.lang.String attributeName)` PUBLIC: Return an expression representing traversal of a 1:many or many:many relationship.
`Expression` | `anyOfAllowingNone(java.lang.String attributeName)` ADVANCED: Return an expression representing traversal of a 1:many or many:many relationship.
`Expression` | `appendSQL(java.lang.String sqlString)` Deprecated. since OracleAS TopLink 10g (9.0.4). See `prefixSQL(java.lang.String)`, `postfixSQL(java.lang.String)`.
`Expression` | `ascending()` PUBLIC: This can only be used within an ordering expression.
`Expression` | `asciiValue()` PUBLIC: Function, returns the single character strings ascii value.
`Expression` | `asOf(AsOfClause pastTime)` Sets all tables represented by this expression to be queried as of a past time.
`Expression` | `average()` PUBLIC: Function, This represents the aggregate function Average.
`Expression` | `between(byte leftValue, byte rightValue)` PUBLIC: Function, between two bytes
`Expression` | `between(char leftChar, char rightChar)` PUBLIC: Function, between two chars
`Expression` | `between(double leftValue, double rightValue)` PUBLIC: Function, between two doubles
`Expression` | `between(Expression leftExpression, Expression rightExpression)`
`Expression` | `between(float leftValue, float rightValue)` PUBLIC: Function, between two floats
`Expression` | `between(int leftValue, int rightValue)` PUBLIC: Function, between two ints
`Expression` | `between(long leftValue, long rightValue)` PUBLIC: Function, between two longs
`Expression` | `between(java.lang.Object leftValue, java.lang.Object rightValue)` PUBLIC: Return an expression that compares if the receiver's value is between two other values.
`Expression` | `between(short leftValue, short rightValue)` PUBLIC: Function, between two shorts
`Expression` | `caseStatement(java.util.Hashtable caseItems, java.lang.String defaultItem)` PUBLIC: Function Convert values returned by the query to values given in the caseItems hashtable.
`Expression` | `concat(java.lang.Object left)` PUBLIC: Function, returns the concatenation of the two string values.
`Expression` | `containsAllKeyWords(java.lang.String spaceSeperatedKeyWords)` PUBLIC: Return an expression that performs a key word search.
`Expression` | `containsAnyKeyWords(java.lang.String spaceSeperatedKeyWords)` PUBLIC: Return an expression that performs a key word search.
`Expression` | `containsSubstring(Expression expression)` PUBLIC: Return an expression that compares if the receivers value contains the substring.
`Expression` | `containsSubstring(java.lang.String theValue)` PUBLIC: Return an expression that compares if the receivers value contains the substring.
`Expression` | `containsSubstringIgnoringCase(Expression expression)` PUBLIC: Return an expression that compares if the receivers value contains the substring, ignoring case.
`Expression` | `containsSubstringIgnoringCase(java.lang.String theValue)` PUBLIC: Return an expression that compares if the receivers value contains the substring, ignoring case.
`Expression` | `count()` PUBLIC: This represents the aggregate function Average.
`Expression` | `currentDate()` PUBLIC: This gives access to the current date on the database through expression.
`Expression` | `dateDifference(java.lang.String datePart, java.util.Date date)` PUBLIC: Function, Return the difference between the queried part of a date(i.e. years, days etc.)
`Expression` | `dateDifference(java.lang.String datePart, Expression comparisonExpression)` PUBLIC: Function, Return the difference between the queried part of a date(i.e. years, days etc.)
`Expression` | `dateName(java.lang.String datePart)` PUBLIC: return a string that represents the given part of a date.
`Expression` | `datePart(java.lang.String datePart)` PUBLIC: Function return an integer which represents the requested part of the date.
`Expression` | `dateToString()` PUBLIC: Function, returns the date converted to the string value in the default database format.
`Expression` | `decode(java.util.Hashtable decodeableItems, java.lang.String defaultItem)` PUBLIC: Function Convert values returned by the query to values given in the decodeableItems hashtable.
`Expression` | `descending()` PUBLIC: This can only be used within an ordering expression.
`Expression` | `difference(java.lang.String expression)` PUBLIC: Function return a value which indicates how much difference there is between two expressions.
`Expression` | `distinct()` PUBLIC: Function, This represents the distinct option inside an aggregate function.
`Expression` | `equal(boolean theBoolean)`
`Expression` | `equal(byte theValue)`
`Expression` | `equal(char theChar)`
`Expression` | `equal(double theValue)`
`Expression` | `equal(Expression theValue)` Returns an expression that compares if the receiver's value is equal to the other value.
`Expression` | `equal(float theValue)`
`Expression` | `equal(int theValue)`
`Expression` | `equal(long theValue)`
`Expression` | `equal(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receiver's value is equal to the other value.
`Expression` | `equal(short theValue)`
`Expression` | `equalsIgnoreCase(Expression theValue)` PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case.
`Expression` | `equalsIgnoreCase(java.lang.String theValue)` PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case.
`Expression` | `exists(ReportQuery subQuery)` PUBLIC: Return a sub query expression.
`Expression` | `existsNode(java.lang.String path)` PUBLIC: XMLType Function, gets the number of nodes returned by the given xpath expression returns 0 if there are none
`Expression` | `extract(java.lang.String path)` PUBLIC: XMLType Function, extracts a secton of XML from a larget XML document
`Expression` | `extractValue(java.lang.String path)` PUBLIC: XMLType Function, extracts a value from an XMLType field
`Expression` | `get(java.lang.String attributeName)` PUBLIC: Return an expression that wraps the attribute or query key name.
`Expression` | `getAllowingNull(java.lang.String attributeName)` ADVANCED: Return an expression that wraps the attribute or query key name.
`AsOfClause` | `getAsOfClause()` Answers the past time the expression is explicitly as of.
`Expression` | `getField(java.lang.String fieldName)` ADVANCED: Return an expression representing a field in a data-level query.
`Expression` | `getFunction(int selector)` ADVANCED: This can be used for accessing user defined functions.
`Expression` | `getFunction(int selector, java.util.Vector arguments)` ADVANCED: This can be used for accessing user defined functions that have arguments.
`Expression` | `getFunction(java.lang.String functionName)` ADVANCED: Return a user defined function accepting the argument.
`Expression` | `getFunction(java.lang.String functionName, java.lang.Object argument)` ADVANCED: Return a user defined function accepting the argument.
`Expression` | `getFunctionWithArguments(java.lang.String functionName, java.util.Vector arguments)` ADVANCED: Return a user defined function accepting all of the arguments.
`Expression` | `getNumberVal()` PUBLIC: XMLType Function - gets a number value from an XMLType
`Expression` | `getParameter(java.lang.String parameterName)` ADVANCED: Return an expression representing a parameter with the given name.
`Expression` | `getStringVal()` PUBLIC: XMLType Function - gets a string value from an XMLType
`Expression` | `getTable(java.lang.String tableName)` ADVANCED: Return an expression representing a table in a data-level query.
`Expression` | `greaterThan(boolean theBoolean)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(byte theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(char theChar)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(double theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(Expression theValue)`
`Expression` | `greaterThan(float theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(int theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(long theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThan(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receiver's value is greater than the other value.
`Expression` | `greaterThan(short theValue)` PUBLIC: Return an expression that compares if the receivers value is equal to the other value.
`Expression` | `greaterThanEqual(boolean theBoolean)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(byte theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(char theChar)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(double theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(Expression theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(float theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(int theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(long theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`Expression` | `greaterThanEqual(short theValue)` PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.
`boolean` | `hasAsOfClause()` ADVANCED: Answers true if `this` is to be queried as of a past time.
`Expression` | `hexToRaw()` PUBLIC: Function, returns binary array value for the hex string.
`Expression` | `ifNull(java.lang.Object nullValue)` PUBLIC: Function return the a specific value if item returned from the query is null.
`Expression` | `in(boolean[] theBooleans)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(byte[] theBytes)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(char[] theChars)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(double[] theDoubles)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(Expression arguments)`
`Expression` | `in(float[] theFloats)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(int[] theInts)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(long[] theLongs)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(java.lang.Object[] theObjects)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(ReportQuery subQuery)`
`Expression` | `in(short[] theShorts)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `in(java.util.Vector theObjects)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `indexOf(java.lang.Object substring)` PUBLIC: Function, returns the integer index of the substring within the source string.
`Expression` | `isEmpty(java.lang.String attributeName)` PUBLIC: A logical expression for the collection `attributeName` being empty.
`Expression` | `isFragment()` PUBLIC: XMLType Function - evaluates to 0 if the xml is a well formed document and 1 if the document is a fragment
`Expression` | `isNull()` PUBLIC: Compare to null.
`Expression` | `lastDay()` PUBLIC: Function, returns the date with the last date in the months of this source date.
`Expression` | `leftPad(int size, java.lang.Object substring)` PUBLIC: Function, returns the string padded with the substring to the size.
`Expression` | `leftPad(java.lang.Object size, java.lang.Object substring)` PUBLIC: Function, returns the string padded with the substring to the size.
`Expression` | `leftTrim()` PUBLIC: Function, returns the string left trimmed for white space.
`Expression` | `length()` PUBLIC: Function, returns the size of the string.
`Expression` | `lessThan(boolean theBoolean)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(byte theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(char theChar)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(double theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(Expression theValue)`
`Expression` | `lessThan(float theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(int theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(long theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThan(short theValue)` PUBLIC: Return an expression that compares if the receivers value is less than the other value.
`Expression` | `lessThanEqual(boolean theBoolean)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(byte theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(char theChar)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(double theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(Expression theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(float theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(int theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(long theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `lessThanEqual(short theValue)` PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.
`Expression` | `like(Expression argument)` PUBLIC: Return an expression that compares if the receivers value is like other value.
`Expression` | `like(java.lang.String value)` PUBLIC: Return an expression that compares if the receivers value is like other value.
`Expression` | `like(java.lang.String value, java.lang.String escapeSequence)` PUBLIC: Return an expression that compares if the receivers value is like other value.
`Expression` | `likeIgnoreCase(Expression theValue)` PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case.
`Expression` | `likeIgnoreCase(java.lang.String theValue)` PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case.
`Expression` | `literal(java.lang.String literal)` ADVANCED: Return an expression on the literal.
`Expression` | `locate(java.lang.Object str)` PUBLIC: Function, returns the position of `str` in `this` Example: TopLink: employee.get("firstName").locate("ob") Java: employee.getFirstName().indexOf("ob") + 1 SQL: LOCATE('ob', t0.F_NAME) Note that while in String.locate(str) -1 is returned if not found, and the index starting at 0 if found, in SQL it is 0 if not found, and the index starting at 1 if found.
`Expression` | `locate(java.lang.Object str, java.lang.Object fromIndex)` PUBLIC: Function, returns the position of `str` in `this`, starting the search at `fromIndex`.
`Expression` | `locate(java.lang.String str, int fromIndex)` PUBLIC: Function, returns the position of `str` in `this`, starting the search at `fromIndex`.
`Expression` | `maximum()` PUBLIC: This represents the aggregate function Maximum.
`Expression` | `minimum()` PUBLIC: This represents the aggregate function Minimum.
`Expression` | `monthsBetween(java.lang.Object otherDate)` PUBLIC: Function, returns the decimal number of months between the two dates.
`Expression` | `newTime(java.lang.String timeZoneFrom, java.lang.String timeZoneTo)` PUBLIC: funcation return a date converted to a new timezone.
`Expression` | `nextDay(java.lang.Object dayName)` PUBLIC: Function, returns the date with the next day from the source date as the day name given.
`Expression` | `noneOf(java.lang.String attributeName, Expression criteria)` PUBLIC: Returns an expression equivalent to none of `attributeName` holding true for `criteria`.
`Expression` | `not()` PUBLIC: Return an expression that is the boolean logical negation of the expression.
`Expression` | `notBetween(byte leftValue, byte rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(char leftChar, char rightChar)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(double leftValue, double rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(Expression leftExpression, Expression rightExpression)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(float leftValue, float rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(int leftValue, int rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(long leftValue, long rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(java.lang.Object leftValue, java.lang.Object rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notBetween(short leftValue, short rightValue)` PUBLIC: Return an expression that compares if the receivers value is not between two other values.
`Expression` | `notEmpty(java.lang.String attributeName)` PUBLIC: A logical expression for the collection `attributeName` not being empty.
`Expression` | `notEqual(boolean theBoolean)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(byte theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(char theChar)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(double theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(Expression theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(float theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(int theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(long theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(java.lang.Object theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notEqual(short theValue)` PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.
`Expression` | `notExists(ReportQuery subQuery)` PUBLIC: Return a sub query expression.
`Expression` | `notIn(boolean[] theBooleans)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(byte[] theBytes)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(char[] theChars)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(double[] theDoubles)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(Expression arguments)`
`Expression` | `notIn(float[] theFloats)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(int[] theInts)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(long[] theLongs)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(java.lang.Object[] theObjects)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(ReportQuery subQuery)`
`Expression` | `notIn(short[] theShorts)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notIn(java.util.Vector theObjects)` PUBLIC: Return an expression that checks if the receivers value is contained in the collection.
`Expression` | `notLike(Expression arguments)` PUBLIC: Return an expression that compares if the receivers value is not like the other value.
`Expression` | `notLike(java.lang.String aString)` PUBLIC: Return an expression that compares if the receivers value is not like the other value.
`Expression` | `notNull()` PUBLIC: Return an expression representing a comparison to null Example: TopLink: employee.get("age").notNull() Java: employee.getAge() !
`Expression` | `or(Expression theExpression)` PUBLIC: Return an expression that is the boolean logical combination of both expressions.
`Expression` | `postfixSQL(java.lang.String sqlString)` ADVANCED: Inserts the SQL as is directly into the expression.
`Expression` | `prefixSQL(java.lang.String sqlString)` ADVANCED: Insert the SQL as is directly into the expression.
`Expression` | `ref()` ADVANCED: For Object-relational support.
`Expression` | `replace(java.lang.Object stringToReplace, java.lang.Object stringToReplaceWith)` PUBLIC: Function, returns the string with occurances of the first substring replaced with the second substring.
`Expression` | `replicate(int constant)` PUBLIC: return the result of this query repeated a given number of times.
`Expression` | `replicate(java.lang.Object theValue)` PUBLIC: return the result of this query repeated a given number of times.
`Expression` | `reverse()` PUBLIC: Function return the reverse of the query result.
`Expression` | `right(int characters)` PUBLIC: Function return a given number of characters starting at the right of a string.
`Expression` | `right(java.lang.Object characters)` PUBLIC: Function return a given number of characters starting at the right of a string.
`Expression` | `rightPad(int size, java.lang.Object substring)` PUBLIC: Function, returns the string padded with the substring to the size.
`Expression` | `rightPad(java.lang.Object size, java.lang.Object substring)` PUBLIC: Function, returns the string padded with the substring to the size.
`Expression` | `rightTrim()` PUBLIC: Function, returns the string right trimmed for white space.
`Expression` | `rightTrim(java.lang.Object substring)` PUBLIC: Function, returns the string with the substring trimed from the right.
`Expression` | `roundDate(java.lang.Object yearOrMonthOrDayRoundToken)` PUBLIC: Function, returns the date rounded to the year, month or day.
`boolean` | `selectIfOrderedBy()` PUBLIC: Return whether this expression should be included in the SELECT clause if it is used in an ORDER BY clause
`void` | `setSelectIfOrderedBy(boolean selectIfOrderedBy)` PUBLIC: Set whether this expression should be included in the SELECT clause of a query that uses it in the ORDER BY clause.
`Expression` | `size(java.lang.String attributeName)` PUBLIC: A logical expression for the size of collection `attributeName`.
`Expression` | `standardDeviation()` PUBLIC: This represents the aggregate function StandardDeviation.
`Expression` | `subQuery(ReportQuery subQuery)` PUBLIC: Return a sub query expression.
`Expression` | `substring(int startPosition, int size)` PUBLIC: Function, returns the substring from the souce string.
`Expression` | `substring(java.lang.Object startPosition, java.lang.Object size)` PUBLIC: Function, returns the substring from the souce string.
`Expression` | `sum()` PUBLIC: This represents the aggregate function Sum.
`Expression` | `toChar()` PUBLIC: Return an expression that represents the receiver value converted to a character string.
`Expression` | `toChar(java.lang.String format)` PUBLIC: Return an expression that represents the receiver value converted to a character string, with the database formating options (i.e.
`Expression` | `toCharacter()` PUBLIC: Function, returns the single character string with the ascii or character set value.
`Expression` | `toDate()` PUBLIC: Function, returns date from the string using the default format.
`Expression` | `toLowerCase()` PUBLIC: Return an expression that represents the receiver value converted to lower case.
`Expression` | `toNumber()` PUBLIC: Function, returns the number converted from the string.
`java.lang.String` | `toString()` PUBLIC: Print a debug form of the expression tree.
`Expression` | `toUpperCase()` PUBLIC: Return an expression that represents the receiver value converted to upper case.
`Expression` | `toUppercaseCasedWords()` PUBLIC: Function, returns the string with the first letter of each word capitalized.
`Expression` | `translate(java.lang.Object fromString, java.lang.Object toString)` PUBLIC: Function, returns the string with each char from the from string converted to the char in the to string.
`Expression` | `trim()` PUBLIC: Function, returns the string trimmed for white space.
`Expression` | `truncateDate(java.lang.String datePart)` PUBLIC: return the date truncated to the indicated datePart.
`Expression` | `value()` PUBLIC: Function, this represents the value function, used in nestedtable
`Expression` | `value(boolean constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(byte constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(char constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(double constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(float constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(int constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(long constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(java.lang.Object constant)` PUBLIC: Return an expression on the constant.
`Expression` | `value(short constant)` PUBLIC: Return an expression on the constant.
`Expression` | `variance()` PUBLIC: Function, this represents the aggregate function Variance.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Expression

    public Expression()

  Base Expression Constructor. Not generally used by Developers

Method Detail

### addDate

    public Expression addDate(java.lang.String datePart,
                              int numberToAdd)

  PUBLIC: Function, return an expression that adds to a date based on the specified datePart. This is eqivalent to the Sybase DATEADD funtion.

  Example:

  > TopLink: employee.get("date").addDate("year", 2) Java: NA SQL: DATEADD(date, 2, year)

### addDate

    public Expression addDate(java.lang.String datePart,
                              java.lang.Object numberToAdd)

  PUBLIC: Function, return an expression that adds to a date based on the specified datePart. This is eqivalent to the Sybase DATEADD funtion.

  Example:

  > TopLink: employee.get("date").addDate("year", 2) Java: NA SQL: DATEADD(date, 2, year)

### addMonths

    public Expression addMonths(int months)

  PUBLIC: Function, to add months to a date.

### addMonths

    public Expression addMonths(java.lang.Object months)

  PUBLIC: Function, to add months to a date.

### allOf

    public Expression allOf(java.lang.String attributeName,
                            Expression criteria)

  PUBLIC: Returns an expression equivalent to all of `attributeName` holding true for `criteria`.

  For every expression with an anyOf, its negation has either an allOf or a noneOf. The following two examples will illustrate as the second is the negation of the first:

  AnyOf Example: Employees with a non '613' area code phone number.

  > ReadAllQuery query = new ReadAllQuery(Employee.class); ExpressionBuilder employee = new ExpressionBuilder(); Expression exp = employee.anyOf("phoneNumbers").get("areaCode").notEqual("613");

  AllOf Example: Employees with all '613' area code phone numbers.

  > ExpressionBuilder employee = new ExpressionBuilder(); ExpressionBuilder phones = new ExpressionBuilder(); Expression exp = employee.allOf("phoneNumbers", phones.get("areaCode").equal("613")); SQL: SELECT ... EMPLOYEE t0 WHERE NOT EXISTS (SELECT ... PHONE t1 WHERE (t0.EMP_ID = t1.EMP_ID) AND NOT (t1.AREACODE = '613'))

  allOf is the universal counterpart to the existential anyOf. To have the condition evaluated for each instance it must be put inside of a subquery, which can be expressed as not exists (any of attributeName some condition). (All x such that y = !Exist x such that !y).

  Likewise the syntax employee.allOf("phoneNumbers").get("areaCode").equal("613") is not supported for the `equal` must go inside a subQuery.

  This method saves you from writing the sub query yourself. The above is equivalent to the following expression:

  > ExpressionBuilder employee = new ExpressionBuilder(); ExpressionBuilder phone = new ExpressionBuilder(); ReportQuery subQuery = new ReportQuery(Phone.class, phone); subQuery.retreivePrimaryKeys(); subQuery.setSelectionCriteria(phone.equal(employee.anyOf("phoneNumbers").and( phone.get("areaCode").notEqual("613"))); Expression exp = employee.notExists(subQuery);

  Note if employee has no phone numbers allOf ~ noneOf.

  Parameters:
    `criteria` - must have its own builder, as it will become the seperate selection criteria of a subQuery.
  Returns:
    a notExists subQuery expression

### and

    public Expression and(Expression theExpression)

  PUBLIC: Return an expression that is the boolean logical combination of both expressions. This is equivalent to the SQL "AND" operator and the Java "&&" operator.

  Example:

  > TopLink: employee.get("firstName").equal("Bob").and(employee.get("lastName").equal("Smith")) Java: (employee.getFirstName().equals("Bob")) && (employee.getLastName().equals("Smith")) SQL: F_NAME = 'Bob' AND L_NAME = 'Smith'

### anyOf

    public Expression anyOf(java.lang.String attributeName)

  PUBLIC: Return an expression representing traversal of a 1:many or many:many relationship. This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria.

  Example:

  Format | Equivalent
  --- | ---
  TopLink | `ReadAllQuery query = new ReadAllQuery(Employee.class); ExpressionBuilder builder = new ExpressionBuilder(); Expression exp = builder.get("id").equal("14858"); exp = exp.or(builder.anyOf("managedEmployees").get("firstName").equal("Bob"));`
  Java | No direct equivalent
  SQL | SELECT DISTINCT ... WHERE (t2.MGR_ID (+) = t1.ID) AND (t2.F_NAME = 'Bob')

### anyOfAllowingNone

    public Expression anyOfAllowingNone(java.lang.String attributeName)

  ADVANCED: Return an expression representing traversal of a 1:many or many:many relationship. This allows you to query whether any of the "many" side of the relationship satisfies the remaining criteria. This version of the anyOf operation performs an outer join. Outer joins allow the join to performed even if the target of the relationship is empty. NOTE: outer joins are not supported on all database and have differing symantics.

  Example:

  Format | Equivalent
  --- | ---
  TopLink | `ReadAllQuery query = new ReadAllQuery(Employee.class); ExpressionBuilder builder = new ExpressionBuilder(); Expression exp = builder.get("id").equal("14858"); exp = exp.or(builder.anyOfAllowingNone("managedEmployees").get("firstName").equal("Bob"));`
  Java | No direct equivalent
  SQL | SELECT DISTINCT ... WHERE (t2.MGR_ID (+) = t1.ID) AND (t2.F_NAME = 'Bob')

### appendSQL

    public Expression appendSQL(java.lang.String sqlString)

  Deprecated. since OracleAS TopLink 10g (9.0.4). See `prefixSQL(java.lang.String)`, `postfixSQL(java.lang.String)`.
  ADVANCED: Append the SQL as is directly into the expression. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

### ascending

    public Expression ascending()

  PUBLIC: This can only be used within an ordering expression. It will order the result ascending. Example:

  > readAllQuery.addOrderBy(expBuilder.get("address").get("city").ascending())

### asciiValue

    public Expression asciiValue()

  PUBLIC: Function, returns the single character strings ascii value.

### asOf

    public Expression asOf(AsOfClause pastTime)

  Sets all tables represented by this expression to be queried as of a past time.

  Example:

        TopLink: employee.asOf(new AsOfClause(pastTime))
        Java: None
        SQL (Flashback): SELECT ... FROM EMPLOYEE AS OF TIMESTAMP (pastTime) t0 ...
        SQL (Generic): .. WHERE (t1.START <= pastTime) AND ((t1.END IS NULL) OR t1.END > pastTime)

  Set an as of clause at the expression level to still query for current objects while expressing selection criteria like:

  - query objects as of one time that met some condition at another time.
  - query objects that changed a certain way over a certain interval (querying for change).

  Simultaneously querying on two versions of the same object (one past one present) lets you express these advanced selection criteria.

  Example: Querying on past attributes using parallel expressions.

  > // Finds all employees who lived in Ottawa as of a past time. ExpressionBuilder employee = new ExpressionBuilder(); ExpressionBuilder pastEmployee = new ExpressionBuilder(Employee.class); pastEmployee.asOf(pastTime); Expression pastAddress = pastEmployee.get("address"); // by default address will also be as of past time. Expression selectionCriteria = pastAddress.get("city").equal("Ottawa").and( employee.equal(pastEmployee));

  The advantage of the parallel expression is that you can still read current objects, the as of clause will affect only the where clause / selection criteria.

  You may be tempted to rewrite the above as employee.get("address").asOf(pastTime). That is allowed but see below for the finer points involved in this.

  Example: Querying on object changes using parallel expressions.

  > // Finds all employees who recently received a raise. Note that current // objects are returned, so can be cached normally. ExpressionBuilder employee = new ExpressionBuilder(); Expression pastEmployee = new ExpressionBuilder(Employee.class); pastEmployee.asOf(yesterday); Expression parallelJoin = employee.equal(pastEmployee); Expression selectionCriteria = parallelJoin.and( employee.get("salary").greaterThan(pastEmployee.get("salary")));

  Example: Querying on object changes using custom query keys

  > // First define the custom query key and add it to your descriptor. ExpressionBuilder builder = new ExpressionBuilder(Employee.class); Expression joinCriteria = builder.getField("EMPLOYEE.EMP_ID").equal(builder.getParameter("EMPLOYEE.EMP_ID")); OneToOneQueryKey selfReferential = new OneToOneQueryKey(); selfReferential.setName("this"); selfReferential.setJoinCriteria(joinCriteria); selfReferential.setReferenceClass(Employee.class); getSession().getDescriptor(Employee.class).addQueryKey(selfReferential); // Now build query as before. Expression employee = new ExpessionBuilder(); Expression pastEmployee = employee.get("this").asOf(yesterday); Expression selectionCriteria = employee.get("salary").greaterThan(pastEmployee.get("salary"));

  Note in general that any parallel expression can be rewritten using a custom query key. TopLink will even automatically interpret x.get("this") for you so you do not need to define the above query key first.

  Full Reference:

  If an object is mapped to multiple tables, then each table will be as of the same time. Two objects mapped to the same table can not have different as of times. Conversely only expressions which have associated tables can have an as of clause.

  If an as of clause is not explicitly set an expression will use the clause of its base expression, and so on recursively until one is found or an ExpressionBuilder is reached. Some useage scenarios follow:

  - employee.asOf(pastTime).anyOf("projects"): projects as of past time.
  - expressionBuilder.asOf(pastTime): entire expression as of past time.
  - employee.asOf(pastTime).anyOf("projects").asOf(null): projects as of current time.
  - employee.anyOf("projects").asOf(pastTime): projects only as of past time.

  Watch out for x.asOf(oneTime).get("y").asOf(anotherTime).

  - emp.anyOf("phoneNumbers").asOf(yesterday) = emp.asOf(yesterday).anyOf("phoneNumbers") but:
  - emp.get("address").asOf(yesterday) != emp.asOf(yesterday).get("address").
  Whether the join is also as of yesterday depends on which table the foreign key field resides on. In an anyOf the foreign key is always on the right, but in a get (1-1) it could be on either side. For this reason employee.get("address").asOf(yesterday) is undefined as it can mean either 'my address as of yesterday', or 'my address, as of yesterday.'
  Returns:
    `this`
  Since:
    OracleAS TopLink 10g (10.0.3)
  See Also:
    `AsOfClause`, `hasAsOfClause()`, `Session.acquireHistoricalSession(oracle.toplink.history.AsOfClause)`, `oracle.toplink.queryframework.ObjectLevelReadQuery#setAsOfClause(oracle.toplink.history.AsOfClause))`

### average

    public Expression average()

  PUBLIC: Function, This represents the aggregate function Average. Can be used only within Report Queries.

### between

    public Expression between(byte leftValue,
                              byte rightValue)

  PUBLIC: Function, between two bytes

### between

    public Expression between(char leftChar,
                              char rightChar)

  PUBLIC: Function, between two chars

### between

    public Expression between(double leftValue,
                              double rightValue)

  PUBLIC: Function, between two doubles

### between

    public Expression between(float leftValue,
                              float rightValue)

  PUBLIC: Function, between two floats

### between

    public Expression between(int leftValue,
                              int rightValue)

  PUBLIC: Function, between two ints

### between

    public Expression between(long leftValue,
                              long rightValue)

  PUBLIC: Function, between two longs

### between

    public Expression between(java.lang.Object leftValue,
                              java.lang.Object rightValue)

  PUBLIC: Return an expression that compares if the receiver's value is between two other values. This means the receiver's value is greater than or equal to the leftValue argument and less than or equal to the rightValue argument.

  This is equivalent to the SQL "BETWEEN AND" operator and Java ">=", "<=;" operators.

  Example:

           TopLink: employee.get("age").between(19,50)
           Java: (employee.getAge() >= 19) && (employee.getAge() <= 50)
           SQL: AGE BETWEEN 19 AND 50

### between

    public Expression between(Expression leftExpression,
                              Expression rightExpression)

### between

    public Expression between(short leftValue,
                              short rightValue)

  PUBLIC: Function, between two shorts

### caseStatement

    public Expression caseStatement(java.util.Hashtable caseItems,
                                    java.lang.String defaultItem)

  PUBLIC: Function Convert values returned by the query to values given in the caseItems hashtable. The equivalent of the Oracle CASE function

  Example:

  > Hashtable caseTable = new Hashtable(); caseTable.put("Robert", "Bob"); caseTable.put("Susan", "Sue"); TopLink: employee.get("name").caseStatement(caseTable, "No-Nickname") Java: NA SQL: CASE name WHEN "Robert" THEN "Bob" WHEN "Susan" THEN "Sue" ELSE "No-Nickname"

  Parameters:
    `caseItems` - java.util.Hashtable a hashtable containing the items to be processed. Keys represent the items to match coming from the query. Values represent what a key will be changed to.
    `defaultItem` - java.lang.String the default value that will be used if none of the keys in the hashtable match

### concat

    public Expression concat(java.lang.Object left)

  PUBLIC: Function, returns the concatenation of the two string values.

### containsAllKeyWords

    public Expression containsAllKeyWords(java.lang.String spaceSeperatedKeyWords)

  PUBLIC: Return an expression that performs a key word search.

  Example:

  > TopLink: project.get("description").containsAllKeyWords("TopLink rdbms java")

### containsAnyKeyWords

    public Expression containsAnyKeyWords(java.lang.String spaceSeperatedKeyWords)

  PUBLIC: Return an expression that performs a key word search.

  Example:

  > TopLink: project.get("description").containsAllKeyWords("TopLink rdbms java")

### containsSubstring

    public Expression containsSubstring(java.lang.String theValue)

  PUBLIC: Return an expression that compares if the receivers value contains the substring.

  Example:

  > TopLink: employee.get("firstName").containsSubstring("Bob") Java: employee.getFirstName().indexOf("Bob") != -1 SQL: F_NAME LIKE '%BOB%'

### containsSubstring

    public Expression containsSubstring(Expression expression)

  PUBLIC: Return an expression that compares if the receivers value contains the substring.

  Example:

  > TopLink: employee.get("firstName").containsSubstring("Bob") Java: employee.getFirstName().indexOf("Bob") != -1 SQL: F_NAME LIKE '%BOB%'

### containsSubstringIgnoringCase

    public Expression containsSubstringIgnoringCase(java.lang.String theValue)

  PUBLIC: Return an expression that compares if the receivers value contains the substring, ignoring case.

  Example:

  > TopLink: employee.get("firstName").containsSubstringIgnoringCase("Bob") Java: employee.getFirstName().toUpperCase().indexOf("BOB") != -1 SQL: F_NAME LIKE '%BOB%'

### containsSubstringIgnoringCase

    public Expression containsSubstringIgnoringCase(Expression expression)

  PUBLIC: Return an expression that compares if the receivers value contains the substring, ignoring case.

  Example:

  > TopLink: employee.get("firstName").containsSubstringIgnoringCase("Bob") Java: employee.getFirstName().toUpperCase().indexOf("BOB") != -1 SQL: F_NAME LIKE '%BOB%'

### count

    public Expression count()

  PUBLIC: This represents the aggregate function Average. Can be used only within Report Queries.

### currentDate

    public Expression currentDate()

  PUBLIC: This gives access to the current date on the database through expression.

### dateDifference

    public Expression dateDifference(java.lang.String datePart,
                                     java.util.Date date)

  PUBLIC: Function, Return the difference between the queried part of a date(i.e. years, days etc.) and same part of the given date. The equivalent of the Sybase function DateDiff

  Example:

  > TopLink: employee.get("date").dateDifference("year", new Date(System.currentTimeMillis())) Java: NA SQL: DATEADD(date, 2, GETDATE)

       *

### dateDifference

    public Expression dateDifference(java.lang.String datePart,
                                     Expression comparisonExpression)

  PUBLIC: Function, Return the difference between the queried part of a date(i.e. years, days etc.) and same part of the given date. The equivalent of the Sybase function DateDiff

  Example:

  > TopLink: employee.get("date").dateDifference("year", new Date(System.currentTimeMillis())) Java: NA SQL: DATEADD(date, 2, GETDATE)

       *

### dateName

    public Expression dateName(java.lang.String datePart)

  PUBLIC: return a string that represents the given part of a date. The equivalent of the Sybase DATENAME function

  Example:

  > TopLink: employee.get("date").dateName("year") Java: new String(date.getYear()) SQL: DATENAME(date, year)

       *

### datePart

    public Expression datePart(java.lang.String datePart)

  PUBLIC: Function return an integer which represents the requested part of the date. Equivalent of the Sybase function DATEPART

  Example:

  > TopLink: employee.get("date").datePart("year") Java: date.getYear() SQL: DATEPART(date, year)

       *

### dateToString

    public Expression dateToString()

  PUBLIC: Function, returns the date converted to the string value in the default database format.

### decode

    public Expression decode(java.util.Hashtable decodeableItems,
                             java.lang.String defaultItem)

  PUBLIC: Function Convert values returned by the query to values given in the decodeableItems hashtable. The equivalent of the Oracle DECODE function. Note: This will only work on databases that support Decode with the syntax below.

  Example:

  > Hashtable decodeTable = new Hashtable(); decodeTable.put("Robert", "Bob"); decodeTable.put("Susan", "Sue"); TopLink: employee.get("name").Decode(decodeTable, "No-Nickname") Java: NA SQL: DECODE(name, "Robert", "Bob", "Susan", "Sue", "No-Nickname")

  Parameters:
    `decodeableItems` - java.util.Hashtable a hashtable containing the items to be decoded. Keys represent the items to match coming from the query. Values represent what a key will be changed to.
    `defaultItem` - the default value that will be used if none of the keys in the hashtable match

### descending

    public Expression descending()

  PUBLIC: This can only be used within an ordering expression. It will order the result descending.

  Example:

  > readAllQuery.addOrderBy(expBuilder.get("address").get("city").descending())

### difference

    public Expression difference(java.lang.String expression)

  PUBLIC: Function return a value which indicates how much difference there is between two expressions. Equivalent of the Sybase DIFFERENCE function

  Example:

  > TopLink: employee.get("name").difference("Frank") SQL: DIFFERENCE(name, 'Frank')

       *

### distinct

    public Expression distinct()

  PUBLIC: Function, This represents the distinct option inside an aggregate function. Can be used only within Report Queries.

### equal

    public Expression equal(byte theValue)

### equal

    public Expression equal(char theChar)

### equal

    public Expression equal(double theValue)

### equal

    public Expression equal(float theValue)

### equal

    public Expression equal(int theValue)

### equal

    public Expression equal(long theValue)

### equal

    public Expression equal(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receiver's value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

  Example:

  > TopLink: employee.get("firstName").equal("Bob") Java: employee.getFirstName().equals("Bob") SQL: F_NAME = 'Bob'

### equal

    public Expression equal(Expression theValue)

  Returns an expression that compares if the receiver's value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

  Since OracleAS TopLink 10g (9.0.4) if `this` is an `ExpressionBuilder` and `theValue` is not used elsewhere, both will be translated to the same table. This can generate SQL with one less join for most exists subqueries.

  Example:

  > TopLink: employee.get("manager").equal(employee) Java: employee.getManager().equals(employee) SQL (optimized): EMP_ID = MANAGER_ID SQL (unoptimized): t0.MANAGER_ID = t1.EMP_ID AND t0.EMP_ID = t1.EMP_ID

  See Also:
    `equal(Object)`

### equal

    public Expression equal(short theValue)

### equal

    public Expression equal(boolean theBoolean)

### equalsIgnoreCase

    public Expression equalsIgnoreCase(java.lang.String theValue)

  PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case. This is equivalent to the Java "equalsIgnoreCase" method.

  Example:

  > TopLink: employee.get("firstName").equalsIgnoreCase("Bob") Java: employee.getFirstName().equalsIgnoreCase("Bob") SQL: UPPER(F_NAME) = 'BOB'

### equalsIgnoreCase

    public Expression equalsIgnoreCase(Expression theValue)

  PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case. This is equivalent to the Java "equalsIgnoreCase" method.

  Example:

  > TopLink: employee.get("firstName").equalsIgnoreCase("Bob") Java: employee.getFirstName().equalsIgnoreCase("Bob") SQL: UPPER(F_NAME) = 'BOB'

### exists

    public Expression exists(ReportQuery subQuery)

  PUBLIC: Return a sub query expression. A sub query using a report query to define a subselect within another queries expression or select's where clause. The sub query (the report query) will use its own expression builder be can reference expressions from the base expression builder.

  Example:

  > ExpressionBuilder builder = new ExpressionBuilder(); ReportQuery subQuery = new ReportQuery(Employee.class, new ExpressionBuilder()); subQuery.setSelectionCriteria(subQuery.getExpressionBuilder().get("name").equal(builder.get("name"))); builder.exists(subQuery);

### get

    public Expression get(java.lang.String attributeName)

  PUBLIC: Return an expression that wraps the attribute or query key name. This method is used to construct user-defined queries containing joins.

  Example:

  > builder.get("address").get("city").equal("Ottawa");

### getAllowingNull

    public Expression getAllowingNull(java.lang.String attributeName)

  ADVANCED: Return an expression that wraps the attribute or query key name. This is only applicable to 1:1 relationships, and allows the target of the relationship to be null if there is no correspondingn relationship in the database. Implemented via an outer join in the database.

  Example:

  > builder.getAllowingNull("address").get("city").equal("Ottawa");

### getAsOfClause

    public AsOfClause getAsOfClause()

  Answers the past time the expression is explicitly as of.
  Returns:
    An immutable object representation of the past time. `null` if no clause set, `AsOfClause.NO_CLAUSE` if clause explicitly set to `null`.
  See Also:
    `asOf(oracle.toplink.history.AsOfClause)`, `hasAsOfClause()`

### getField

    public Expression getField(java.lang.String fieldName)

  ADVANCED: Return an expression representing a field in a data-level query. This is used internally in TopLink, or to construct queries involving fields and/or tables that are not mapped.

  Example:

  > builder.getField("ADDR_ID").greaterThan(100); builder.getTable("PROJ_EMP").getField("TYPE").equal("S");

### getFunction

    public Expression getFunction(int selector)

  ADVANCED: This can be used for accessing user defined functions. The operator must be defined in ExpressionOperator to be able to reference it.
  See Also:

    Example:

    > builder.get("name").getFunction(MyFunctions.FOO_BAR).greaterThan(100);

### getFunction

    public Expression getFunction(int selector,
                                  java.util.Vector arguments)

  ADVANCED: This can be used for accessing user defined functions that have arguments. The operator must be defined in ExpressionOperator to be able to reference it.
  See Also:

    Example:

    > Vector arguments = new Vector(); arguments.addElement("blee"); builder.get("name").getFunction(MyFunctions.FOO_BAR, arguments).greaterThan(100);

### getFunction

    public Expression getFunction(java.lang.String functionName)

  ADVANCED: Return a user defined function accepting the argument. The function is assumed to be a normal prefix function and will print like, UPPER(base).

  Example:

  > builder.get("firstName").getFunction("UPPER");

### getFunction

    public Expression getFunction(java.lang.String functionName,
                                  java.lang.Object argument)

  ADVANCED: Return a user defined function accepting the argument. The function is assumed to be a normal prefix function and will print like, CONCAT(base, argument).

### getFunctionWithArguments

    public Expression getFunctionWithArguments(java.lang.String functionName,
                                               java.util.Vector arguments)

  ADVANCED: Return a user defined function accepting all of the arguments. The function is assumed to be a normal prefix function like, CONCAT(base, value1, value2, value3, ...).

### getParameter

    public Expression getParameter(java.lang.String parameterName)

  ADVANCED: Return an expression representing a parameter with the given name.

### getTable

    public Expression getTable(java.lang.String tableName)

  ADVANCED: Return an expression representing a table in a data-level query. This is used internally in TopLink, or to construct queries involving fields and/or tables that are not mapped.

  Example:

  > builder.getTable("PROJ_EMP").getField("TYPE").equal("S");

### greaterThan

    public Expression greaterThan(byte theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(char theChar)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(double theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(float theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(int theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(long theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receiver's value is greater than the other value. This is equivalent to the SQL ">" operator.

### greaterThan

    public Expression greaterThan(Expression theValue)

### greaterThan

    public Expression greaterThan(short theValue)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThan

    public Expression greaterThan(boolean theBoolean)

  PUBLIC: Return an expression that compares if the receivers value is equal to the other value. This is equivalent to the SQL "=" operator and Java "equals" method.

### greaterThanEqual

    public Expression greaterThanEqual(byte theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(char theChar)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(double theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(float theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(int theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(long theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(Expression theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(short theValue)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### greaterThanEqual

    public Expression greaterThanEqual(boolean theBoolean)

  PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value. This is equivalent to the SQL ">=" operator .

### hasAsOfClause

    public boolean hasAsOfClause()

  ADVANCED: Answers true if `this` is to be queried as of a past time.
  Returns:
    false from `asOf(null); hasAsOfClause()`.
  See Also:
    `getAsOfClause()`

### hexToRaw

    public Expression hexToRaw()

  PUBLIC: Function, returns binary array value for the hex string.

### ifNull

    public Expression ifNull(java.lang.Object nullValue)

  PUBLIC: Function return the a specific value if item returned from the query is null. Equivalent of the oracle NVL function

  Example:

  > TopLink: employee.get("name").ifNull("no-name") Java: NA SQL: NVL(name, 'no-name')

       *

### in

    public Expression in(byte[] theBytes)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(char[] theChars)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(double[] theDoubles)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(float[] theFloats)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(int[] theInts)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(long[] theLongs)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(java.lang.Object[] theObjects)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(short[] theShorts)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(boolean[] theBooleans)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### in

    public Expression in(java.util.Vector theObjects)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

  Example:

  > TopLink: employee.get("age").in(agesVector) Java: agesVector.contains(employee.getAge()) SQL: AGE IN (55, 18, 30)

### in

    public Expression in(Expression arguments)

### in

    public Expression in(ReportQuery subQuery)

### indexOf

    public Expression indexOf(java.lang.Object substring)

  PUBLIC: Function, returns the integer index of the substring within the source string.

### isEmpty

    public Expression isEmpty(java.lang.String attributeName)

  PUBLIC: A logical expression for the collection `attributeName` being empty. Equivalent to `size(attributeName).equal(0)`

  Example:

  > TopLink: employee.isEmpty("phoneNumbers") Java: employee.getPhoneNumbers().size() == 0 SQL: SELECT ... FROM EMP t0 WHERE ( (SELECT COUNT(*) FROM PHONE t1 WHERE (t0.EMP_ID = t1.EMP_ID)) = 0)

  This is a case where a fast operation in java does not translate to an equally fast operation in SQL, requiring a correlated subselect.
  See Also:
    `size(java.lang.String)`

### isNull

    public Expression isNull()

  PUBLIC: Compare to null.

### lastDay

    public Expression lastDay()

  PUBLIC: Function, returns the date with the last date in the months of this source date.

### leftPad

    public Expression leftPad(int size,
                              java.lang.Object substring)

  PUBLIC: Function, returns the string padded with the substring to the size.

### leftPad

    public Expression leftPad(java.lang.Object size,
                              java.lang.Object substring)

  PUBLIC: Function, returns the string padded with the substring to the size.

### leftTrim

    public Expression leftTrim()

  PUBLIC: Function, returns the string left trimmed for white space.

### length

    public Expression length()

  PUBLIC: Function, returns the size of the string.

### lessThan

    public Expression lessThan(byte theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(char theChar)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(double theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(float theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(int theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(long theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(Expression theValue)

### lessThan

    public Expression lessThan(short theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThan

    public Expression lessThan(boolean theBoolean)

  PUBLIC: Return an expression that compares if the receivers value is less than the other value. This is equivalent to the SQL "<" operator.

### lessThanEqual

    public Expression lessThanEqual(byte theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(char theChar)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(double theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(float theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(int theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(long theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(Expression theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(short theValue)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### lessThanEqual

    public Expression lessThanEqual(boolean theBoolean)

  PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value. This is equivalent to the SQL "<=" operator.

### like

    public Expression like(java.lang.String value)

  PUBLIC: Return an expression that compares if the receivers value is like other value. This is equivalent to the SQL "LIKE" operator that except wildcards. The character "%" means any sequence of characters and the character "_" mean any character. i.e. "B%" == "Bob", "B_B" == "BOB"

  Example:

  > TopLink: employee.get("firstName").like("B%") Java: NA SQL: F_NAME LIKE 'B%'

### like

    public Expression like(java.lang.String value,
                           java.lang.String escapeSequence)

  PUBLIC: Return an expression that compares if the receivers value is like other value. This is equivalent to the SQL "LIKE ESCAPE" operator that except wildcards. The character "%" means any sequence of characters and the character "_" mean any character. i.e. "B%" == "Bob", "B_B" == "BOB" The escape sequence specifies a set of characters the may be used to indicate that an one of the wildcard characters should be interpretted literally.

  Example:

  > TopLink: employee.get("firstName").like("B\_SMITH", "\") Java: NA SQL: F_NAME LIKE 'B\_SMITH ESCAPE '\''

### like

    public Expression like(Expression argument)

  PUBLIC: Return an expression that compares if the receivers value is like other value. This is equivalent to the SQL "LIKE" operator that except wildcards. The character "%" means any sequence of characters and the character "_" mean any character. i.e. "B%" == "Bob", "B_B" == "BOB"

  Example:

  > TopLink: employee.get("firstName").like("B%") Java: NA SQL: F_NAME LIKE 'B%'

### likeIgnoreCase

    public Expression likeIgnoreCase(java.lang.String theValue)

  PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case. This is a case in-sensitive like.

  Example:

  > TopLink: employee.get("firstName").likeIgnoreCase("%Bob%") Java: none SQL: UPPER(F_NAME) LIKE '%BOB%'

### likeIgnoreCase

    public Expression likeIgnoreCase(Expression theValue)

  PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case. This is a case in-sensitive like.

### locate

    public Expression locate(java.lang.Object str)

  PUBLIC: Function, returns the position of `str` in `this`

  Example:

  > TopLink: employee.get("firstName").locate("ob") Java: employee.getFirstName().indexOf("ob") + 1 SQL: LOCATE('ob', t0.F_NAME)

       Note that while in String.locate(str) -1 is returned if not found, and the
       index starting at 0 if found, in SQL it is 0 if not found, and the index
       starting at 1 if found.

### locate

    public Expression locate(java.lang.String str,
                             int fromIndex)

  PUBLIC: Function, returns the position of `str` in `this`, starting the search at `fromIndex`.

  Example:

  > TopLink: employee.get("firstName").locate("ob", 1) Java: employee.getFirstName().indexOf("ob", 1) + 1 SQL: LOCATE('ob', t0.F_NAME, 1)

       Note that while in String.locate(str) -1 is returned if not found, and the
       index starting at 0 if found, in SQL it is 0 if not found, and the index
       starting at 1 if found.

### locate

    public Expression locate(java.lang.Object str,
                             java.lang.Object fromIndex)

  PUBLIC: Function, returns the position of `str` in `this`, starting the search at `fromIndex`.

  Example:

  > TopLink: employee.get("firstName").locate("ob", 1) Java: employee.getFirstName().indexOf("ob", 1) + 1 SQL: LOCATE('ob', t0.F_NAME, 1)

       Note that while in String.locate(str) -1 is returned if not found, and the
       index starting at 0 if found, in SQL it is 0 if not found, and the index
       starting at 1 if found.

### maximum

    public Expression maximum()

  PUBLIC: This represents the aggregate function Maximum. Can be used only within Report Queries.

### minimum

    public Expression minimum()

  PUBLIC: This represents the aggregate function Minimum. Can be used only within Report Queries.

### monthsBetween

    public Expression monthsBetween(java.lang.Object otherDate)

  PUBLIC: Function, returns the decimal number of months between the two dates.

### newTime

    public Expression newTime(java.lang.String timeZoneFrom,
                              java.lang.String timeZoneTo)

  PUBLIC: funcation return a date converted to a new timezone. Equivalent of the Oracle NEW_TIME function

  Example:

  > TopLink: employee.get("date").newTime("EST", "PST") Java: NA SQL: NEW_TIME(date, 'EST', 'PST')

       *

### nextDay

    public Expression nextDay(java.lang.Object dayName)

  PUBLIC: Function, returns the date with the next day from the source date as the day name given.

### noneOf

    public Expression noneOf(java.lang.String attributeName,
                             Expression criteria)

  PUBLIC: Returns an expression equivalent to none of `attributeName` holding true for `criteria`.

  For every expression with an anyOf, its negation has either an allOf or a noneOf. The following two examples will illustrate as the second is the negation of the first:

  AnyOf Example: Employees with a '613' area code phone number.

  > ReadAllQuery query = new ReadAllQuery(Employee.class); ExpressionBuilder employee = new ExpressionBuilder(); Expression exp = employee.anyOf("phoneNumbers").get("areaCode").equal("613");

  NoneOf Example: Employees with no '613' area code phone numbers.

  > ExpressionBuilder employee = new ExpressionBuilder(); ExpressionBuilder phones = new ExpressionBuilder(); Expression exp = employee.noneOf("phoneNumbers", phones.get("areaCode").equal("613")); SQL: SELECT ... EMPLOYEE t0 WHERE NOT EXISTS (SELECT ... PHONE t1 WHERE (t0.EMP_ID = t1.EMP_ID) AND (t1.AREACODE = '613'))

  noneOf is the universal counterpart to the existential anyOf. To have the condition evaluated for each instance it must be put inside of a subquery, which can be expressed as not exists (any of attributeName some condition). (All x such that !y = !Exist x such that y).

  Likewise the syntax employee.noneOf("phoneNumbers").get("areaCode").equal("613") is not supported for the `equal` must go inside a subQuery.

  This method saves you from writing the sub query yourself. The above is equivalent to the following expression:

  > ExpressionBuilder employee = new ExpressionBuilder(); ExpressionBuilder phone = new ExpressionBuilder(); ReportQuery subQuery = new ReportQuery(Phone.class, phone); subQuery.retreivePrimaryKeys(); subQuery.setSelectionCriteria(phone.equal(employee.anyOf("phoneNumbers").and( phone.get("areaCode").equal("613"))); Expression exp = employee.notExists(subQuery);

  Parameters:
    `criteria` - must have its own builder, as it will become the seperate selection criteria of a subQuery.
  Returns:
    a notExists subQuery expression

### not

    public Expression not()

  PUBLIC: Return an expression that is the boolean logical negation of the expression. This is equivalent to the SQL "NOT" operator and the Java "!" operator.

  Example:

  > TopLink: employee.get("age").equal(24).not() Java: (! (employee.getAge() == 24)) SQL: NOT (AGE = 24)

### notBetween

    public Expression notBetween(byte leftValue,
                                 byte rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(char leftChar,
                                 char rightChar)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(double leftValue,
                                 double rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(float leftValue,
                                 float rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(int leftValue,
                                 int rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(long leftValue,
                                 long rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(java.lang.Object leftValue,
                                 java.lang.Object rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(Expression leftExpression,
                                 Expression rightExpression)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notBetween

    public Expression notBetween(short leftValue,
                                 short rightValue)

  PUBLIC: Return an expression that compares if the receivers value is not between two other values. Equivalent to between negated.
  See Also:
    `between(Object, Object)`

### notEmpty

    public Expression notEmpty(java.lang.String attributeName)

  PUBLIC: A logical expression for the collection `attributeName` not being empty. Equivalent to `size(attributeName).greaterThan(0)`

  Example:

  > TopLink: employee.notEmpty("phoneNumbers") Java: employee.getPhoneNumbers().size() > 0 SQL: SELECT ... FROM EMP t0 WHERE ( (SELECT COUNT(*) FROM PHONE t1 WHERE (t0.EMP_ID = t1.EMP_ID)) > 0)

  This is a case where a fast operation in java does not translate to an equally fast operation in SQL, requiring a correlated subselect.
  See Also:
    `size(java.lang.String)`

### notEqual

    public Expression notEqual(byte theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(char theChar)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(double theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(float theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(int theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(long theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(java.lang.Object theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(Expression theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(short theValue)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notEqual

    public Expression notEqual(boolean theBoolean)

  PUBLIC: Return an expression that compares if the receivers value is not equal to the other value. This is equivalent to the SQL "<>" operator
  See Also:
    `equal(Object)`

### notExists

    public Expression notExists(ReportQuery subQuery)

  PUBLIC: Return a sub query expression. A sub query using a report query to define a subselect within another queries expression or select's where clause. The sub query (the report query) will use its own expression builder be can reference expressions from the base expression builder.

  Example:

  > ExpressionBuilder builder = new ExpressionBuilder(); ReportQuery subQuery = new ReportQuery(Employee.class, new ExpressionBuilder()); subQuery.setSelectionCriteria(subQuery.getExpressionBuilder().get("name").equal(builder.get("name"))); builder.notExists(subQuery);

### notIn

    public Expression notIn(byte[] theBytes)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(char[] theChars)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(double[] theDoubles)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(float[] theFloats)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(int[] theInts)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(long[] theLongs)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(java.lang.Object[] theObjects)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(ReportQuery subQuery)

### notIn

    public Expression notIn(short[] theShorts)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(boolean[] theBooleans)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

### notIn

    public Expression notIn(java.util.Vector theObjects)

  PUBLIC: Return an expression that checks if the receivers value is contained in the collection. This is equivalent to the SQL "IN" operator and Java "contains" operator.

  Example:

  > TopLink: employee.get("age").in(agesVector) Java: agesVector.contains(employee.getAge()) SQL: AGE IN (55, 18, 30)

### notIn

    public Expression notIn(Expression arguments)

### notLike

    public Expression notLike(java.lang.String aString)

  PUBLIC: Return an expression that compares if the receivers value is not like the other value. Equivalent to like negated.
  See Also:
    `like(String)`

### notLike

    public Expression notLike(Expression arguments)

  PUBLIC: Return an expression that compares if the receivers value is not like the other value. Equivalent to like negated.
  See Also:
    `like(String)`

### notNull

    public Expression notNull()

  PUBLIC: Return an expression representing a comparison to null

  Example:

  > TopLink: employee.get("age").notNull() Java: employee.getAge() != null SQL: AGE IS NOT NULL

### or

    public Expression or(Expression theExpression)

  PUBLIC: Return an expression that is the boolean logical combination of both expressions. This is equivalent to the SQL "OR" operator and the Java "||" operator.

  Example:

  > TopLink: employee.get("firstName").equal("Bob").OR(employee.get("lastName").equal("Smith")) Java: (employee.getFirstName().equals("Bob")) || (employee.getLastName().equals("Smith")) SQL: F_NAME = 'Bob' OR L_NAME = 'Smith'

### postfixSQL

    public Expression postfixSQL(java.lang.String sqlString)

  ADVANCED: Inserts the SQL as is directly into the expression. The sql will be printed immediately after (postfixed to) the sql for this. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

### prefixSQL

    public Expression prefixSQL(java.lang.String sqlString)

  ADVANCED: Insert the SQL as is directly into the expression. The sql will be printed immediately before (prefixed to) the sql for this. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

### ref

    public Expression ref()

  ADVANCED: For Object-relational support.

### replace

    public Expression replace(java.lang.Object stringToReplace,
                              java.lang.Object stringToReplaceWith)

  PUBLIC: Function, returns the string with occurances of the first substring replaced with the second substring.

### replicate

    public Expression replicate(int constant)

  PUBLIC: return the result of this query repeated a given number of times. Equivalent of the Sybase REPLICATE function

  Example:

  > TopLink: employee.get("name").replicate(2) Java: NA SQL: REPLICATE(name, 2)

### replicate

    public Expression replicate(java.lang.Object theValue)

  PUBLIC: return the result of this query repeated a given number of times. Equivalent of the Sybase REPLICATE function

  Example:

  > TopLink: employee.get("name").replicate(2) Java: NA SQL: REPLICATE(name, 2)

### reverse

    public Expression reverse()

  PUBLIC: Function return the reverse of the query result. Equivalent of the Sybase REVERSE function

  Example:

  > TopLink: employee.get("name").reverse() Java: NA SQL: REVERSE(name)

### right

    public Expression right(int characters)

  PUBLIC: Function return a given number of characters starting at the right of a string. Equivalent to the Sybase RIGHT function

  Example:

  > TopLink: employee.get("name").right(2) Java: NA SQL: RIGHT(name, 2)

### right

    public Expression right(java.lang.Object characters)

  PUBLIC: Function return a given number of characters starting at the right of a string. Equivalent to the Sybase RIGHT function

  Example:

  > TopLink: employee.get("name").right(2) Java: NA SQL: RIGHT(name, 2)

### rightPad

    public Expression rightPad(int size,
                               java.lang.Object substring)

  PUBLIC: Function, returns the string padded with the substring to the size.

### rightPad

    public Expression rightPad(java.lang.Object size,
                               java.lang.Object substring)

  PUBLIC: Function, returns the string padded with the substring to the size.

### rightTrim

    public Expression rightTrim()

  PUBLIC: Function, returns the string right trimmed for white space.

### rightTrim

    public Expression rightTrim(java.lang.Object substring)

  PUBLIC: Function, returns the string with the substring trimed from the right.

### roundDate

    public Expression roundDate(java.lang.Object yearOrMonthOrDayRoundToken)

  PUBLIC: Function, returns the date rounded to the year, month or day.

### selectIfOrderedBy

    public boolean selectIfOrderedBy()

  PUBLIC: Return whether this expression should be included in the SELECT clause if it is used in an ORDER BY clause

### setSelectIfOrderedBy

    public void setSelectIfOrderedBy(boolean selectIfOrderedBy)

  PUBLIC: Set whether this expression should be included in the SELECT clause of a query that uses it in the ORDER BY clause.
  Parameters:
    `selectIfOrderedBy` -

### size

    public Expression size(java.lang.String attributeName)

  PUBLIC: A logical expression for the size of collection `attributeName`.

  Example:

  > TopLink: employee.size("phoneNumbers") Java: employee.getPhoneNumbers().size() SQL: SELECT ... FROM EMP t0 WHERE ... (SELECT COUNT(*) FROM PHONE t1 WHERE (t0.EMP_ID = t1.EMP_ID))

  This is a case where a fast operation in java does not translate to an equally fast operation in SQL, requiring a correlated subselect.

### standardDeviation

    public Expression standardDeviation()

  PUBLIC: This represents the aggregate function StandardDeviation. Can be used only within Report Queries.

### subQuery

    public Expression subQuery(ReportQuery subQuery)

  PUBLIC: Return a sub query expression. A sub query using a report query to define a subselect within another queries expression or select's where clause. The sub query (the report query) will use its own expression builder be can reference expressions from the base expression builder.

  Example:

  > ExpressionBuilder builder = new ExpressionBuilder(); ReportQuery subQuery = new ReportQuery(Employee.class, new ExpressionBuilder()); subQuery.addMaximum("salary"); builder.get("salary").equal(builder.subQuery(subQuery));

### substring

    public Expression substring(int startPosition,
                                int size)

  PUBLIC: Function, returns the substring from the souce string.

### substring

    public Expression substring(java.lang.Object startPosition,
                                java.lang.Object size)

  PUBLIC: Function, returns the substring from the souce string.

### sum

    public Expression sum()

  PUBLIC: This represents the aggregate function Sum. Can be used only within Report Queries.

### toCharacter

    public Expression toCharacter()

  PUBLIC: Function, returns the single character string with the ascii or character set value.

### toDate

    public Expression toDate()

  PUBLIC: Function, returns date from the string using the default format.

### toChar

    public Expression toChar()

  PUBLIC: Return an expression that represents the receiver value converted to a character string. This is equivalent to the SQL "TO_CHAR" operator and Java "toString" method.

  Example:

  > TopLink: employee.get("salary").toChar().equal("100000") Java: employee.getSalary().toString().equals("100000") SQL: TO_CHAR(SALARY) = '100000'

### toChar

    public Expression toChar(java.lang.String format)

  PUBLIC: Return an expression that represents the receiver value converted to a character string, with the database formating options (i.e. 'year', 'yyyy', 'day', etc.). This is equivalent to the SQL "TO_CHAR" operator and Java Date API.

  Example:

  > TopLink: employee.get("startDate").toChar("day").equal("monday") Java: employee.getStartDate().getDay().equals("monday") SQL: TO_CHAR(START_DATE, 'day') = 'monday'

### toLowerCase

    public Expression toLowerCase()

  PUBLIC: Return an expression that represents the receiver value converted to lower case. This is equivalent to the SQL "LOWER" operator and Java "toLowerCase" method. This is only allowed for String attribute values.

  Example:

  > TopLink: employee.get("firstName").toLowerCase().equal("bob") Java: employee.getFirstName().toLowerCase().equals("bob") SQL: LOWER(F_NAME) = 'bob'

### toNumber

    public Expression toNumber()

  PUBLIC: Function, returns the number converted from the string.

### toString

    public java.lang.String toString()

  PUBLIC: Print a debug form of the expression tree.

### toUpperCase

    public Expression toUpperCase()

  PUBLIC: Return an expression that represents the receiver value converted to upper case. This is equivalent to the SQL "UPPER" operator and Java "toUpperCase" method. This is only allowed for String attribute values.

  Example:

  > TopLink: employee.get("firstName").toUpperCase().equal("BOB") Java: employee.getFirstName().toUpperCase().equals("BOB") SQL: UPPER(F_NAME) = 'BOB'

### toUppercaseCasedWords

    public Expression toUppercaseCasedWords()

  PUBLIC: Function, returns the string with the first letter of each word capitalized.

### translate

    public Expression translate(java.lang.Object fromString,
                                java.lang.Object toString)

  PUBLIC: Function, returns the string with each char from the from string converted to the char in the to string.

### trim

    public Expression trim()

  PUBLIC: Function, returns the string trimmed for white space.

### extract

    public Expression extract(java.lang.String path)

  PUBLIC: XMLType Function, extracts a secton of XML from a larget XML document

### extractValue

    public Expression extractValue(java.lang.String path)

  PUBLIC: XMLType Function, extracts a value from an XMLType field

### existsNode

    public Expression existsNode(java.lang.String path)

  PUBLIC: XMLType Function, gets the number of nodes returned by the given xpath expression returns 0 if there are none

### isFragment

    public Expression isFragment()

  PUBLIC: XMLType Function - evaluates to 0 if the xml is a well formed document and 1 if the document is a fragment

### getStringVal

    public Expression getStringVal()

  PUBLIC: XMLType Function - gets a string value from an XMLType

### getNumberVal

    public Expression getNumberVal()

  PUBLIC: XMLType Function - gets a number value from an XMLType

### truncateDate

    public Expression truncateDate(java.lang.String datePart)

  PUBLIC: return the date truncated to the indicated datePart. Equivalent to the Sybase TRUNC function for dates

  Example:

  > TopLink: employee.get("date").truncDate(year) Java: NA SQL: TRUNC(date, year)

### value

    public Expression value()

  PUBLIC: Function, this represents the value function, used in nestedtable

### value

    public Expression value(byte constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(char constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(double constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(float constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(int constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(long constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(java.lang.Object constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(short constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### value

    public Expression value(boolean constant)

  PUBLIC: Return an expression on the constant.

  Example:

  > reportQuery.addItem("a constant", builder.value("a constant"));

### literal

    public Expression literal(java.lang.String literal)

  ADVANCED: Return an expression on the literal. A literal is a specific SQL syntax string that will be printed as is without quotes in the SQL. It can be useful for printing database key words or global variables.

  Example:

  > reportQuery.addItem("currentTime", builder.literal("SYSDATE"));

### variance

    public Expression variance()

  PUBLIC: Function, this represents the aggregate function Variance. Can be used only within Report Queries.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD