Top Description Fields Constructors Methods
org.eclipse.persistence.expressions

public abstract Class Expression

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
org.eclipse.persistence.internal.expressions.BaseExpression, org.eclipse.persistence.internal.expressions.CompoundExpression, org.eclipse.persistence.internal.expressions.ConstantExpression, org.eclipse.persistence.internal.expressions.LiteralExpression
Imports
java.io.BufferedWriter, .IOException, .Serializable, .StringWriter, java.util.ArrayList, .Collection, .IdentityHashMap, .Iterator, .List, .Map, .Set, .StringTokenizer, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.QueryException, org.eclipse.persistence.history.AsOfClause, org.eclipse.persistence.internal.expressions.ArgumentListFunctionExpression, .BaseExpression, .CollectionExpression, .ConstantExpression, .ExpressionIterator, .ExpressionJavaPrinter, .ExpressionNormalizer, .ExpressionSQLPrinter, .FunctionExpression, .LiteralExpression, .MapEntryExpression, .ParameterExpression, .SQLSelectStatement, .SubSelectExpression, .TableAliasLookup, org.eclipse.persistence.internal.helper.ClassConstants, .DatabaseField, .DatabaseTable, org.eclipse.persistence.internal.localization.ToStringLocalization, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.queries.DatabaseQuery, .ReadQuery, .ReportQuery

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:

Field Summary

Modifier and TypeField and Description
protected transient DatabaseTable
protected int
hashCode

PERF: Cache the hashCode.

protected transient DatabaseTable
lastTable

Temporary values for table aliasing

protected boolean
pack-priv static final long
serialVersionUID

Required for serialization compatibility.

public static boolean
shouldUseUpperCaseForIgnoreCase

Use the upper() function for case insensitive expression operations (default).

Constructor Summary

AccessConstructor and Description
protected
Expression()

Base Expression Constructor.

Method Summary

Modifier and TypeMethod and Description
public Expression
addDate(String datePart, int numberToAdd)

PUBLIC: Function, return an expression that adds to a date based on the specified datePart.

public Expression
addDate(String datePart, Object numberToAdd)

PUBLIC: Function, return an expression that adds to a date based on the specified datePart.

public Expression
addMonths(int months)

PUBLIC: Function, to add months to a date.

public Expression
addMonths(Object months)

PUBLIC: Function, to add months to a date.

public Expression
alias(String alias)

ADVANCED: Return an expression for the alias.

public DatabaseTable
aliasForTable(DatabaseTable table)

INTERNAL: Find the alias for a given table

public Expression
all(byte[] theBytes)

PUBLIC: Return an expression that is used with a comparison expression.

public Expression
all(char[] theChars)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(double[] theDoubles)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(float[] theFloats)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(int[] theInts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(long[] theLongs)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(Object[] theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(short[] theShorts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(boolean[] theBooleans)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(List<E> theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
all(Expression arguments)

public Expression
all(ReportQuery subQuery)

public Expression

Returns:

a notExists subQuery expression
allOf
(String attributeName, Expression
must have its own builder, as it will become the separate selection criteria of a subQuery.
criteria
)

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

public Expression
and(Expression theExpression)

PUBLIC: Return an expression that is the boolean logical combination of both expressions.

public Expression
any(byte[] theBytes)

PUBLIC: Return an expression that is used with a comparison expression.

public Expression
any(char[] theChars)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(double[] theDoubles)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(float[] theFloats)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(int[] theInts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(long[] theLongs)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(Object[] theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(short[] theShorts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(boolean[] theBooleans)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(List<E> theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
any(Expression arguments)

public Expression
any(ReportQuery subQuery)

public Expression
anyOf(String attributeName)

PUBLIC: Return an expression representing traversal of a 1:many or many:many relationship.

public Expression
anyOf(String attributeName, boolean
indicates whether a new expression should be created.
shouldJoinBeIndependent
)

ADVANCED: Return an expression representing traversal of a 1:many or many:many relationship.

public Expression
anyOfAllowingNone(String attributeName)

ADVANCED: Return an expression representing traversal of a 1:many or many:many relationship.

public Expression
anyOfAllowingNone(String attributeName, boolean
indicates whether a new expression should be created.
shouldJoinBeIndependent
)

ADVANCED: Return an expression representing traversal of a 1:many or many:many relationship.

public Expression
as(String alias)

ADVANCED: Assign an alias to the expression in the select clause.

public Expression
ascending()

PUBLIC: This can only be used within an ordering expression.

public Expression
asciiValue()

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

public Expression

Returns:

this
asOf
(AsOfClause
A read only data object used to represent a past time.
pastTime
)

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

protected void
assignAlias(String name, DatabaseTable tableOrExpression)

INTERNAL: Alias a particular table within this node

public int
assignTableAliasesStartingAt(int initialValue)

INTERNAL: Assign aliases to any tables which I own.

public Expression
average()

PUBLIC: Function, This represents the aggregate function Average.

public Expression
between(byte leftValue, byte rightValue)

PUBLIC: Function, between two bytes

public Expression
between(char leftChar, char rightChar)

PUBLIC: Function, between two chars

public Expression
between(double leftValue, double rightValue)

PUBLIC: Function, between two doubles

public Expression
between(float leftValue, float rightValue)

PUBLIC: Function, between two floats

public Expression
between(int leftValue, int rightValue)

PUBLIC: Function, between two ints

public Expression
between(long leftValue, long rightValue)

PUBLIC: Function, between two longs

public Expression
between(Object leftValue, Object rightValue)

PUBLIC: Return an expression that compares if the receiver's value is between two other values.

public Expression
between(Expression leftExpression, Expression rightExpression)

public Expression
between(short leftValue, short rightValue)

PUBLIC: Function, between two shorts

public Expression
caseConditionStatement(Map<Expression, Object>
java.util.Map A Map 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.
caseConditions
,
Object
java.lang.Object the default value that will be used if none of the keys in the Map match
defaultItem
)

PUBLIC: Function Convert values returned by the query to values given in the caseConditions Map.

public ArgumentListFunctionExpression
caseConditionStatement()

INTERNAL: Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form:

SQL: CASE WHEN name = "Robert" THEN "Bob"
    WHEN name = "Susan" THEN "Sue"
 ELSE "No-Nickname"
public Expression
caseStatement(Map<K, V>
java.util.Map A Map 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.
caseItems
,
Object
java.lang.String the default value that will be used if none of the keys in the hashtable match
defaultItem
)

PUBLIC: Function Convert values returned by the query to values given in the caseItems Map.

public ArgumentListFunctionExpression
caseStatement()

INTERNAL: Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form:

SQL: CASE name WHEN "Robert" THEN "Bob"
    WHEN "Susan" THEN "Sue"
 ELSE "No-Nickname"
public Expression
cast(String
is the database type name, this is database specific but should include, "CHAR", "VARCHAR", "NUMERIC", "INTEGER", "DATE", "TIME", "TIMESTAMP", the type may include a size and scale.
type
)

PUBLIC: Cast the value to the database type.

public Object
clone()

Overrides java.lang.Object.clone.

INTERNAL: Clone the expression maintaining clone identity in the inter-connected expression graph.
public Expression
cloneUsing(Expression newBase)

INTERNAL: This expression is built on a different base than the one we want.

public ArgumentListFunctionExpression
coalesce(Collection<E>
java.util.Collection A Collection containing the items to check if null
expressions
)

PUBLIC: Function Return null if all arguments are null and the first non-null argument otherwise The equivalent of the COALESCE SQL function

Example:

List list = new ArrayList(3);
list.add(builder.get("firstName"));
list.add(builder.get("lastName"));
list.add(builder.get("nickname"));

EclipseLink: expressionBuilder.coalesce(caseTable)
Java: NA
SQL: COALESCE(firstname, lastname, nickname)
public ArgumentListFunctionExpression
public int
computeHashCode()

INTERNAL: Compute a consistent hash-code for the expression.

public Expression
concat(Object left)

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

public Expression
containsAllKeyWords(String spaceSeparatedKeyWords)

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

public Expression
containsAnyKeyWords(String spaceSeparatedKeyWords)

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

public Expression
containsSubstring(String theValue)

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

public Expression
containsSubstring(Expression expression)

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

public Expression
containsSubstringIgnoringCase(String theValue)

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

public Expression
containsSubstringIgnoringCase(Expression expression)

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

protected void
public Expression
convertToUseOuterJoin()

INTERNAL: Modify this expression to use outer joins wherever there are equality operations between two field nodes.

public Expression
copiedVersionFrom(Map<K, V> alreadyDone)

INTERNAL:

public Expression
count()

PUBLIC: This represents the aggregate function Average.

public Expression
create(Expression base, Object singleArgument, ExpressionOperator anOperator)

INTERNAL:

public Expression
create(Expression base, List<E> arguments, ExpressionOperator anOperator)

INTERNAL:

public Expression
createWithBaseLast(Expression base, Object singleArgument, ExpressionOperator anOperator)

INTERNAL:

public Expression
currentDate()

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

public Expression
currentDateDate()

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

public Expression
currentTime()

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

public Expression
currentTimeStamp()

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

public Expression
dateDifference(String datePart, 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.

public Expression
dateDifference(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.

public Expression
dateName(String datePart)

PUBLIC: return a string that represents the given part of a date.

public Expression
datePart(String datePart)

PUBLIC: Function return an integer which represents the requested part of the date.

public Expression
dateToString()

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

public Expression
decode(Map<K, V>
java.util.Map a Map 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.
decodeableItems
,
String
the default value that will be used if none of the keys in the Map match
defaultItem
)

PUBLIC: Function Convert values returned by the query to values given in the decodeableItems Map.

public Expression
descending()

PUBLIC: This can only be used within an ordering expression.

public String
descriptionOfNodeType()

INTERNAL: Used in debug printing of this node.

public Expression
difference(String expression)

PUBLIC: Function return a value which indicates how much difference there is between two expressions.

public Expression
distinct()

PUBLIC: Function, This represents the distinct option inside an aggregate function.

public boolean
doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy)

INTERNAL: Check if the object conforms to the expression in memory.

public boolean
doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean
true if object possibly not a clone, but is being conformed against the unit of work cache; if object is not in the UOW cache but some of its attributes are, use the registered versions of object's attributes for the purposes of this method.
objectIsUnregistered
)

INTERNAL: New parameter added to doesConform for feature 2612601

public Expression
equal(byte theValue)

public Expression
equal(char theChar)

public Expression
equal(double theValue)

public Expression
equal(float theValue)

public Expression
equal(int theValue)

public Expression
equal(long theValue)

public Expression
equal(Object theValue)

PUBLIC: Return an expression that compares if the receiver's value is equal to the other value.

public Expression
equal(Expression theValue)

Returns an expression that compares if the receiver's value is equal to the other value.

public Expression
equal(short theValue)

public Expression
equal(boolean theBoolean)

public Expression
equalOuterJoin(Object theValue)

INTERNAL: Return an expression representing an outer join comparison

public Expression
equalOuterJoin(Expression theValue)

INTERNAL: Return an expression representing an outer join comparison

public boolean
equals(Object
the reference object with which to compare.
expression
)

Overrides java.lang.Object.equals.

INTERNAL: Return if the expression is equal to the other.
public Expression
equalsIgnoreCase(String theValue)

PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case.

public Expression
equalsIgnoreCase(Expression theValue)

PUBLIC: Return an expression that compares if the receiver's value is equal to the other value, ignoring case.

public Expression
except(ReportQuery query)

PUBLIC: Return a except expression with the subquery.

public Expression
except(Expression arguments)

PUBLIC: Return a except expression with the subquery.

public Expression
exceptAll(ReportQuery query)

PUBLIC: Return a except all expression with the subquery.

public Expression
exceptAll(Expression arguments)

PUBLIC: Return a except all expression with the subquery.

public Expression
exists(ReportQuery subQuery)

PUBLIC: Return a sub query expression.

public Expression
existsNode(String
Xpath expression
xpath
)

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

public Expression
extract(String
is the date part to extract, "YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND", "TIMEZONE_HOUR", "TIMEZONE_MINUTE".
part
)

PUBLIC: Extract the date part from the date/time value.

public boolean
extractFields(boolean requireExactMatch, boolean primaryKey, ClassDescriptor descriptor, List<DatabaseField> searchFields, Set<DatabaseField> foundFields)

INTERNAL: Return if the expression is not a valid primary key expression and add all primary key fields to the set.

public boolean
extractPrimaryKeyValues(boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow)

INTERNAL: Extract the primary key from the expression into the row.

public Expression
extractValue(String
XPath expression
xpath
)

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

public boolean
extractValues(boolean primaryKeyOnly, boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow)

INTERNAL: Extract the primary key from the expression into the row.

public Expression
extractXml(String
XPath expression representing the node to be returned
xpath
)

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

public static Expression
from(Object value, Expression base)

INTERNAL: Create an expression node.

public static Expression
fromConstant(Object value, Expression base)

INTERNAL: Create an expression node.

public static Expression
fromLiteral(String value, Expression base)

INTERNAL: Create an expression node.

public Expression
get(String attributeName)

PUBLIC: Return an expression that wraps the attribute or query key name.

public Expression
get(String attributeName, boolean
- allows the get to not force an inner-join (if getAllowingNull was used elsewhere).
forceInnerJoin
)

PUBLIC: Return an expression that wraps the attribute or query key name.

public Expression
getAlias(Expression subSelect)

ADVANCED: Return an expression representing a sub-select in the from clause.

public Expression
getAllowingNull(String attributeName)

ADVANCED: Return an expression that wraps the attribute or query key name.

public AsOfClause

Returns:

An immutable object representation of the past time. null if no clause set, AsOfClause.NO_CLAUSE if clause explicitly set to null.
getAsOfClause
()

Answers the past time the expression is explicitly as of.

public AsOfClause
getAsOfClauseRecursively()

INTERNAL: For Flashback: If this expression is not already as of some timestamp gets the clause from the base expression.

public abstract ExpressionBuilder
getBuilder()

INTERNAL: Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root)

public DatabaseField
getClonedField()

INTERNAL: If there are any fields associated with this expression, return them

public Expression
getField(String fieldName)

ADVANCED: Return an expression representing a field in a data-level query.

public Expression
getField(DatabaseField field)

ADVANCED: Return an expression representing a field in a data-level query.

public List<DatabaseField>
getFields()

INTERNAL:

public Object
getFieldValue(Object objectValue, AbstractSession session)

INTERNAL: Transform the object-level value into a database-level value

public Expression
getFunction(int selector)

ADVANCED: This can be used for accessing user defined functions.

public Expression
getFunction(int selector, List<E> arguments)

ADVANCED: This can be used for accessing user defined functions that have arguments.

public Expression
getFunction(String functionName)

ADVANCED: Return a user defined function accepting the argument.

public Expression
getFunction(String functionName, Object argument)

ADVANCED: Return a user defined function accepting the argument.

public Expression
getFunctionWithArguments(String functionName, List<E> arguments)

ADVANCED: Return a user defined function accepting all of the arguments.

public ClassDescriptor
getLeafDescriptor(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session)

INTERNAL: Lookup the descriptor for this item by traversing its expression recursively.

public DatabaseMapping
getLeafMapping(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session)

INTERNAL: Lookup the mapping for this item by traversing its expression recursively.

public String
getName()

INTERNAL:

public Expression
getNumberVal()

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

public ExpressionOperator
getOperator()

INTERNAL: Most expression have operators, so this is just a convenience method.

public static ExpressionOperator
getOperator(int selector)

INTERNAL: Create a new expression tree with the named operator.

public List<DatabaseTable>
getOwnedTables()

INTERNAL: Return the tables that this node owns for purposes of table aliasing.

public Expression
getParameter(String parameterName, Object type)

INTERNAL: Return an expression representing a parameter with the given name and type

public Expression
getParameter(String parameterName)

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

public Expression
getParameter(DatabaseField field)

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

public Expression
getProperty(DatabaseField field)

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

public List<DatabaseField>
getSelectionFields()

INTERNAL:

public List<DatabaseField>
public AbstractSession
getSession()

INTERNAL:

public Expression
getStringVal()

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

public Expression
getTable(String tableName)

ADVANCED: Return an expression representing a table in a data-level query.

public Expression
getTable(DatabaseTable table)

ADVANCED: Return an expression representing a table in a data-level query.

public TableAliasLookup
getTableAliases()

INTERNAL: Return the aliases used.

public Expression
greaterThan(byte theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(char theChar)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(double theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(float theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(int theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(long theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(Object theValue)

PUBLIC: Return an expression that compares if the receiver's value is greater than the other value.

public Expression
public Expression
greaterThan(short theValue)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThan(boolean theBoolean)

PUBLIC: Return an expression that compares if the receivers value is equal to the other value.

public Expression
greaterThanEqual(byte theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(char theChar)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(double theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(float theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(int theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(long theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(Object theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(Expression theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(short theValue)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public Expression
greaterThanEqual(boolean theBoolean)

PUBLIC: Return an expression that compares if the receivers value is greater and equal to the other value.

public boolean

Returns:

false from asOf(null); hasAsOfClause().
hasAsOfClause
()

ADVANCED: Answers true if this is to be queried as of a past time.

public boolean
hasBeenAliased()

INTERNAL: Answers if the database tables associated with this expression have been aliased.

public int
hashCode()

Overrides java.lang.Object.hashCode.

INTERNAL: Return a consistent hash-code for the expression.
public Expression
hexToRaw()

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

public Expression
ifNull(Object nullValue)

PUBLIC: Function return a specific value if item returned from the query is null.

public Expression
in(byte[] theBytes)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(char[] theChars)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(double[] theDoubles)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(float[] theFloats)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(int[] theInts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(long[] theLongs)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(Object[] theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(short[] theShorts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(boolean[] theBooleans)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(Collection<E> theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
in(Expression arguments)

public Expression
in(ReportQuery subQuery)

public Expression
public Expression
indexOf(Object substring)

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

public Expression
intersect(ReportQuery query)

PUBLIC: Return a intersect expression with the subquery.

public Expression
intersect(Expression arguments)

PUBLIC: Return a intersect expression with the subquery.

public Expression
intersectAll(ReportQuery query)

PUBLIC: Return a intersect all expression with the subquery.

public Expression
intersectAll(Expression arguments)

PUBLIC: Return a intersect all expression with the subquery.

public boolean
public boolean
public boolean
public boolean
isDataExpression()

INTERNAL:

public Expression
isEmpty(String attributeName)

PUBLIC: A logical expression for the collection attributeName being empty.

public boolean
public boolean
isFieldExpression()

INTERNAL:

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

public boolean
public boolean
public boolean
public boolean
public Expression
isNull()

PUBLIC: Compare to null.

public boolean
isObjectExpression()

INTERNAL:

public boolean
public boolean
public boolean
public boolean
public boolean
isTableExpression()

INTERNAL:

public boolean
isTreatExpression()

INTERNAL:

public boolean
isValueExpression()

INTERNAL: Subclasses implement (isParameterExpression() || isConstantExpression())

public void
iterateOn(ExpressionIterator iterator)

INTERNAL: For iterating using an inner class

public Expression
join(Expression target, Expression onClause)

ADVANCED: Defines a join between the two objects based on the specified ON clause.

public Expression
lastDay()

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

public Expression
leftJoin(Expression target, Expression onClause)

ADVANCED: Defines an outer join between the two objects based on the specified ON clause.

public Expression
leftPad(int size, Object substring)

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

public Expression
leftPad(Object size, Object substring)

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

public Expression
leftTrim()

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

public Expression
leftTrim(Object substring)

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

public Expression
length()

PUBLIC: Function, returns the size of the string.

public Expression
lessThan(byte theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(char theChar)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(double theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(float theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(int theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(long theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(Object theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(Expression theValue)

public Expression
lessThan(short theValue)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThan(boolean theBoolean)

PUBLIC: Return an expression that compares if the receivers value is less than the other value.

public Expression
lessThanEqual(byte theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(char theChar)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(double theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(float theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(int theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(long theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(Object theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(Expression theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(short theValue)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
lessThanEqual(boolean theBoolean)

PUBLIC: Return an expression that compares if the receivers value is less than and equal to the other value.

public Expression
like(String value)

PUBLIC: Return an expression that compares if the receivers value is like other value.

public Expression
like(String value, String escapeSequence)

PUBLIC: Return an expression that compares if the receivers value is like other value.

public Expression
like(Expression argument)

PUBLIC: Return an expression that compares if the receivers value is like other value.

public Expression
like(Expression value, Expression escapeSequence)

PUBLIC: Return an expression that compares if the receivers value is like other value.

public Expression
likeIgnoreCase(String theValue)

PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case.

public Expression
likeIgnoreCase(Expression theValue)

PUBLIC: Return an expression that compares if the receivers value is like the other value, ignoring case.

public Expression
literal(String literal)

ADVANCED: Return an expression on the literal.

public Expression
localDate()

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

public Expression
localDateTime()

PUBLIC: This gives access to the local date and time on the database through expression.

public Expression
localTime()

PUBLIC: This gives access to the local time only on the database through expression.

public Expression
locate(Object str)

PUBLIC: Function, returns the position of str in this

Example:

EclipseLink: employee.get("firstName").locate("ob")
Java: employee.getFirstName().indexOf("ob") + 1
SQL: LOCATE('ob', t0.F_NAME)
public Expression
locate(String str, int fromIndex)

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

public Expression
locate(Object str, Object fromIndex)

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

public Expression
mapEntry()

PUBLIC: Return a Map.Entry containing the key and the value from a mapping that maps to a java.util.Map This expression can only be used as a return value in a ReportQuery and cannot be used as part of the WHERE clause in any query EclipseLink: eb.get("mapAttribute").mapEntry()

public Expression
mapKey()

PUBLIC: Return the key from a mapping that maps to a java.util.Map This expression can be used either in as a return value in a ReportQuery or in the WHERE clause in a query EclipseLink: eb.get("mapAttribute").mapKey()

public Expression
maximum()

PUBLIC: This represents the aggregate function Maximum.

public Expression
minimum()

PUBLIC: This represents the aggregate function Minimum.

public Expression
monthsBetween(Object otherDate)

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

public Expression
newTime(String timeZoneFrom, String timeZoneTo)

PUBLIC: funcation return a date converted to a new timezone.

public Expression
nextDay(Object dayName)

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

public Expression

Returns:

a notExists subQuery expression
noneOf
(String attributeName, Expression
must have its own builder, as it will become the separate selection criteria of a subQuery.
criteria
)

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

public Expression
normalize(ExpressionNormalizer normalizer)

INTERNAL: Normalize into a structure that is printable.

public Expression
not()

PUBLIC: Return an expression that is the boolean logical negation of the expression.

public Expression
notBetween(byte leftValue, byte rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(char leftChar, char rightChar)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(double leftValue, double rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(float leftValue, float rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(int leftValue, int rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(long leftValue, long rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(Object leftValue, Object rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(Expression leftExpression, Expression rightExpression)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notBetween(short leftValue, short rightValue)

PUBLIC: Return an expression that compares if the receivers value is not between two other values.

public Expression
notEmpty(String attributeName)

PUBLIC: A logical expression for the collection attributeName not being empty.

public Expression
notEqual(byte theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(char theChar)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(double theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(float theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(int theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(long theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(Object theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(Expression theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(short theValue)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notEqual(boolean theBoolean)

PUBLIC: Return an expression that compares if the receivers value is not equal to the other value.

public Expression
notExists(ReportQuery subQuery)

PUBLIC: Return a sub query expression.

public Expression
notIn(byte[] theBytes)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(char[] theChars)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(double[] theDoubles)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(float[] theFloats)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(int[] theInts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(long[] theLongs)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(Object[] theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(ReportQuery subQuery)

public Expression
notIn(short[] theShorts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(boolean[] theBooleans)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(Collection<E> theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
notIn(Expression arguments)

public Expression
notLike(String aString)

PUBLIC: Return an expression that compares if the receivers value is not like the other value.

public Expression
notLike(Expression arguments)

PUBLIC: Return an expression that compares if the receivers value is not like the other value.

public Expression
notLike(String
string to compare
value
,
String
the escape character to use
escapeSequence
)

PUBLIC: Return an expression that compares if the receivers value is not like the other value.

public Expression
notLike(Expression
string to compare
value
,
Expression
the escape character to use
escapeSequence
)

PUBLIC: Return an expression that compares if the receivers value is not like the other value.

public Expression
notNull()

PUBLIC: Return an expression representing a comparison to null

Example:

    EclipseLink: employee.get("age").notNull()
    Java: employee.getAge() != null
    SQL: AGE IS NOT NULL
public Expression
nullIf(Object
java.lang.Object the value/expression that will be compared to the base expression
object
)

PUBLIC: Function Test if arguments are equal, returning null if they are and the value of the first expression otherwise.

public Expression
nullsFirst()

PUBLIC: This can only be used within an ordering expression.

public Expression
nullsLast()

PUBLIC: This can only be used within an ordering expression.

public Expression
operator(String name, List<E> arguments)

ADVANCED: This can be used for accessing user defined operators that have arguments.

public Expression
or(Expression theExpression)

PUBLIC: Return an expression that is the boolean logical combination of both expressions.

public Expression
performOperator(ExpressionOperator anOperator, List<E> args)

INTERNAL:

protected void
postCopyIn(Map<K, V> alreadyDone)

public Expression
postfixSQL(String sqlString)

ADVANCED: Inserts the SQL as is directly into the expression.

public Expression
prefixSQL(String sqlString)

ADVANCED: Insert the SQL as is directly into the expression.

public void
printJava(ExpressionJavaPrinter printer)

INTERNAL: Print java for project class generation

public abstract void
printSQL(ExpressionSQLPrinter printer)

INTERNAL: Print SQL

public abstract Expression
rebuildOn(Expression newBase)

INTERNAL: This expression is built on a different base than the one we want.

public Expression
ref()

ADVANCED: For Object-relational support.

public Expression
regexp(String regexp)

PUBLIC: Return an expression that compares if the receivers value matches the regular expression.

public Expression
regexp(Expression regexp)

PUBLIC: Return an expression that compares if the receivers value matches the regular expression.

protected Expression
registerIn(Map<K, V> alreadyDone)

public Expression
replace(Object stringToReplace, Object stringToReplaceWith)

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

public Expression
replicate(int constant)

PUBLIC: return the result of this query repeated a given number of times.

public Expression
replicate(Object theValue)

PUBLIC: return the result of this query repeated a given number of times.

protected void
resetCache()

Reset cached information here so that we can be sure we're accurate.

public abstract void
resetPlaceHolderBuilder(ExpressionBuilder queryBuilder)

INTERNAL: Search the tree for any expressions (like SubSelectExpressions) that have been built using a builder that is not attached to the query.

public Expression
reverse()

PUBLIC: Function return the reverse of the query result.

public Expression
right(int characters)

PUBLIC: Function return a given number of characters starting at the right of a string.

public Expression
right(Object characters)

PUBLIC: Function return a given number of characters starting at the right of a string.

public Expression
rightPad(int size, Object substring)

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

public Expression
rightPad(Object size, Object substring)

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

public Expression
rightTrim()

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

public Expression
rightTrim(Object substring)

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

public Expression
roundDate(Object yearOrMonthOrDayRoundToken)

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

public boolean
selectIfOrderedBy()

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

public void
setLocalBase(Expression exp)

INTERNAL: Set the local base expression, ie the one on the other side of the operator Most types will ignore this, since they don't need it.

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.

public Expression
shallowClone()

INTERNAL:

public Expression
size(String attributeName)

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

public Expression
size(Class<?> returnType)

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

public Expression
some(byte[] theBytes)

PUBLIC: Return an expression that is used with a comparison expression.

public Expression
some(char[] theChars)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(double[] theDoubles)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(float[] theFloats)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(int[] theInts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(long[] theLongs)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(Object[] theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(short[] theShorts)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(boolean[] theBooleans)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(List<E> theObjects)

PUBLIC: Return an expression that checks if the receivers value is contained in the collection.

public Expression
some(Expression arguments)

public Expression
some(ReportQuery subQuery)

public Expression
sql(String sql, List<E> arguments)

ADVANCED: Parse the SQL for parameter and return a custom function expression using a custom operator that will print itself as the SQL.

public Expression
standardDeviation()

PUBLIC: This represents the aggregate function StandardDeviation.

public Expression
subQuery(ReportQuery subQuery)

PUBLIC: Return a sub query expression.

public Expression
substring(int startPosition, int size)

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

public Expression
substring(Object startPosition, Object size)

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

public Expression
substring(int startPosition)

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

public Expression
substring(Object startPosition)

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

public Expression
sum()

PUBLIC: This represents the aggregate function Sum.

public Expression
toChar()

PUBLIC: Return an expression that represents the receiver value converted to a character string.

public Expression
toChar(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.).

public Expression
toCharacter()

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

public Expression
toDate()

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

public Expression
toLowerCase()

PUBLIC: Return an expression that represents the receiver value converted to lower case.

public Expression
toNumber()

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

public String
toString()

Overrides java.lang.Object.toString.

PUBLIC: Print a debug form of the expression tree.
public void
toString(BufferedWriter writer, int indent)

INTERNAL: Print a debug form of the expression tree.

public Expression
toUpperCase()

PUBLIC: Return an expression that represents the receiver value converted to upper case.

public Expression
toUppercaseCasedWords()

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

public Expression
translate(Object fromString, Object toString)

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

public Expression
treat(Class<?> castClass)

ADVANCED: Return an expression that allows you to treat its base as if it were a subclass of the class returned by the base This can only be called on an ExpressionBuilder, the result of expression.get(String), expression.getAllowingNull(String), the result of expression.anyOf("String") or the result of expression.anyOfAllowingNull("String") downcast uses Expression.type() internally to guarantee the results are of the specified class.

public Expression
trim()

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

public Expression
trim(Object substring)

PUBLIC: Function, returns the string right and left trimmed for the substring.

public Expression
truncateDate(String datePart)

PUBLIC: return the date truncated to the indicated datePart.

public Expression
twist(Expression expression, Expression newBase)

INTERNAL: We are given an expression that comes from a different context than the one in which this was built, e.g. it is the selection criteria of a mapping, or the criteria on which multiple tables are joined in a descriptor.

public Expression
twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.

public Expression
type()

PUBLIC: Return an expression that wraps the inheritance type field in an expression.

public Expression
union(Expression arguments)

PUBLIC: Return a union expression with the subquery.

public Expression
union(ReportQuery query)

PUBLIC: Return a union expression with the subquery.

public Expression
unionAll(ReportQuery query)

PUBLIC: Return a union all expression with the subquery.

public Expression
unionAll(Expression arguments)

PUBLIC: Return a union all expression with the subquery.

public void
validateNode()

INTERNAL: Do any required validation for this node.

public Expression
value()

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

public Expression
value(byte constant)

PUBLIC: Return an expression on the constant.

public Expression
value(char constant)

PUBLIC: Return an expression on the constant.

public Expression
value(double constant)

PUBLIC: Return an expression on the constant.

public Expression
value(float constant)

PUBLIC: Return an expression on the constant.

public Expression
value(int constant)

PUBLIC: Return an expression on the constant.

public Expression
value(long constant)

PUBLIC: Return an expression on the constant.

public Expression
value(Object constant)

PUBLIC: Return an expression on the constant.

public Expression
value(short constant)

PUBLIC: Return an expression on the constant.

public Expression
value(boolean constant)

PUBLIC: Return an expression on the constant.

public Object
valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean
true if object possibly not a clone, but is being conformed against the unit of work cache.
isObjectUnregistered
)

INTERNAL: Return the value for in memory comparison.

public Object
valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy)

INTERNAL: Return the value for in memory comparison.

public Expression
variance()

PUBLIC: Function, this represents the aggregate function Variance.

protected void
writeAlias(ExpressionSQLPrinter printer, DatabaseField field, SQLSelectStatement statement)

INTERNAL: Append the field's alias to the writer.

public void
writeDescriptionOn(BufferedWriter writer)

INTERNAL: Used to print a debug form of the expression tree.

protected void
writeField(ExpressionSQLPrinter printer, DatabaseField field, SQLSelectStatement statement)

INTERNAL: Append the field name to the writer.

public void
writeFields(ExpressionSQLPrinter printer, List<DatabaseField> newFields, SQLSelectStatement statement)

INTERNAL: called from SQLSelectStatement.writeFieldsFromExpression(...)

public void
writeSubexpressionsTo(BufferedWriter writer, int indent)

INTERNAL: Used in SQL printing.

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait