public class FunctionExpression extends Expression
Modifier and Type | Field and Description |
---|---|
protected Expression |
baseExpression |
protected Vector |
children |
protected ExpressionOperator |
operator |
protected ExpressionOperator |
platformOperator |
protected Class |
resultType |
currentAlias, lastTable, selectIfOrderedBy
Constructor and Description |
---|
FunctionExpression() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Expression child) |
DatabaseTable |
aliasForTable(DatabaseTable table)
INTERNAL:
Find the alias for a given table
|
Expression |
create(Expression base,
Object singleArgument,
ExpressionOperator operator)
INTERNAL:
|
Expression |
create(Expression base,
Vector arguments,
ExpressionOperator operator)
INTERNAL:
|
Expression |
createWithBaseLast(Expression base,
Object singleArgument,
ExpressionOperator anOperator)
INTERNAL:
added for Trim support.
|
String |
descriptionOfNodeType()
INTERNAL:
Used for debug printing.
|
boolean |
doesConform(Object object,
AbstractSession session,
AbstractRecord translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean isObjectUnregistered)
INTERNAL:
Check if the object conforms to the expression in memory.
|
Expression |
getBaseExpression() |
ExpressionBuilder |
getBuilder()
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)
|
Vector |
getChildren() |
Vector |
getFields()
INTERNAL: Not to be confused with the public getField(String)
This returns a collection of all fields associated with this object.
|
ExpressionOperator |
getOperator()
INTERNAL:
Most expression have operators, so this is just a convenience method.
|
ExpressionOperator |
getPlatformOperator(DatabasePlatform platform) |
Class |
getResultType() |
boolean |
hasResultType() |
void |
initializePlatformOperator(DatabasePlatform platform)
INTERNAL:
|
boolean |
isFunctionExpression()
INTERNAL:
|
protected boolean |
isObjectComparison()
INTERNAL:
Return if the represents an object comparison.
|
void |
iterateOn(ExpressionIterator iterator)
INTERNAL:
For iterating using an inner class
|
Expression |
normalize(ExpressionNormalizer normalizer)
INTERNAL:
Normalize into a structure that is printable.
|
protected void |
postCopyIn(Dictionary alreadyDone)
INTERNAL:
Used for cloning.
|
void |
printInCollection(Vector items,
ExpressionSQLPrinter printer,
ExpressionOperator operator)
INTERNAL: Print the collection in "IN" onto the SQL stream.
|
void |
printJava(ExpressionJavaPrinter printer)
INTERNAL:
Print java for project class generation
|
void |
printSQL(ExpressionSQLPrinter printer)
INTERNAL:
Print SQL
|
Expression |
rebuildOn(Expression newBase)
INTERNAL:
This expression is built on a different base than the one we want.
|
void |
setBaseExpression(Expression expression)
Sets the base of the expression
Added to allow creation of functions which take the column name
as something other than the first option.
|
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.
|
void |
setOperator(ExpressionOperator theOperator) |
void |
setResultType(Class resultType) |
Expression |
twistedForBaseAndContext(Expression newBase,
Expression context)
INTERNAL:
Rebuild myself against the base, with the values of parameters supplied by the context
expression.
|
Object |
valueFromObject(Object object,
AbstractSession session,
AbstractRecord translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean isObjectUnregistered)
INTERNAL:
Return the value for in memory comparison.
|
void |
writeDescriptionOn(BufferedWriter writer)
INTERNAL:
Used to print a debug form of the expression tree.
|
void |
writeFields(ExpressionSQLPrinter printer,
Vector newFields,
SQLSelectStatement statement)
INTERNAL: called from SQLSelectStatement.writeFieldsFromExpression(...)
|
void |
writeSubexpressionsTo(BufferedWriter writer,
int indent)
INTERNAL:
Used in SQL printing.
|
addDate, addDate, addMonths, addMonths, all, all, all, all, all, all, all, all, all, all, all, all, allOf, and, any, any, any, any, any, any, any, any, any, any, any, any, anyOf, anyOfAllowingNone, ascending, asciiValue, assignAlias, assignTableAliasesStartingAt, average, between, between, between, between, between, between, between, between, between, caseStatement, clone, cloneUsing, concat, containsAllKeyWords, containsAnyKeyWords, containsSubstring, containsSubstring, containsSubstringIgnoringCase, containsSubstringIgnoringCase, convertNodeToUseOuterJoin, convertToUseOuterJoin, copiedVersionFrom, count, currentDate, currentDateDate, currentTime, currentTimeStamp, dateDifference, dateDifference, dateName, datePart, dateToString, decode, descending, detectExpression, difference, distinct, doesConform, equal, equal, equal, equal, equal, equal, equal, equal, equal, equal, equalOuterJoin, equalOuterJoin, equalsIgnoreCase, equalsIgnoreCase, exists, existsNode, extract, extractPrimaryKeyValues, extractValue, from, fromConstant, fromLiteral, get, get, getAllowingNull, getAllowingNull, getClonedField, getField, getField, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, getName, getNumberVal, getOperator, getOwnedTables, getParameter, getParameter, getParameter, getSession, getStringVal, getTable, getTable, getTableAliases, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hasAsOfClause, hasBeenAliased, hexToRaw, ifNull, in, in, in, in, in, in, in, in, in, in, in, in, indexOf, isCompoundExpression, isConstantExpression, isDataExpression, isEmpty, isExpressionBuilder, isFieldExpression, isFragment, isLiteralExpression, isLogicalExpression, isNull, isObjectExpression, isParameterExpression, isQueryKeyExpression, isRelationExpression, isTableExpression, isValueExpression, lastDay, leftPad, leftPad, leftTrim, leftTrim, length, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, like, like, like, like, likeIgnoreCase, likeIgnoreCase, literal, locate, locate, locate, maximum, minimum, monthsBetween, newTime, nextDay, noneOf, not, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notEmpty, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notExists, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notNull, or, performOperator, postfixSQL, prefixSQL, printSQLWithoutConversion, ref, registerIn, replace, replicate, replicate, resetCache, reverse, right, right, rightPad, rightPad, rightTrim, rightTrim, roundDate, selectIfOrderedBy, setSelectIfOrderedBy, shallowClone, size, some, some, some, some, some, some, some, some, some, some, some, some, standardDeviation, subQuery, substring, substring, sum, toChar, toChar, toCharacter, toDate, toLowerCase, toNumber, toString, toString, toUpperCase, toUppercaseCasedWords, translate, trim, trim, truncateDate, twist, validateNode, value, value, value, value, value, value, value, value, value, value, valueFromObject, variance, writeField
protected Expression baseExpression
protected Vector children
protected ExpressionOperator operator
protected transient ExpressionOperator platformOperator
protected Class resultType
public void addChild(Expression child)
public DatabaseTable aliasForTable(DatabaseTable table)
aliasForTable
in class Expression
public Expression create(Expression base, Object singleArgument, ExpressionOperator operator)
create
in class Expression
public Expression createWithBaseLast(Expression base, Object singleArgument, ExpressionOperator anOperator)
createWithBaseLast
in class Expression
public Expression create(Expression base, Vector arguments, ExpressionOperator operator)
create
in class Expression
public String descriptionOfNodeType()
descriptionOfNodeType
in class Expression
public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean isObjectUnregistered)
doesConform
in class Expression
public Expression getBaseExpression()
public ExpressionBuilder getBuilder()
getBuilder
in class Expression
public Vector getChildren()
public Vector getFields()
getFields
in class Expression
public ExpressionOperator getOperator()
Expression
getOperator
in class Expression
public ExpressionOperator getPlatformOperator(DatabasePlatform platform)
public Class getResultType()
public boolean hasResultType()
public void initializePlatformOperator(DatabasePlatform platform)
public boolean isFunctionExpression()
Expression
isFunctionExpression
in class Expression
protected boolean isObjectComparison()
public void iterateOn(ExpressionIterator iterator)
iterateOn
in class Expression
public Expression normalize(ExpressionNormalizer normalizer)
normalize
in class Expression
protected void postCopyIn(Dictionary alreadyDone)
postCopyIn
in class Expression
public void printSQL(ExpressionSQLPrinter printer)
printSQL
in class Expression
public void printInCollection(Vector items, ExpressionSQLPrinter printer, ExpressionOperator operator)
public void printJava(ExpressionJavaPrinter printer)
printJava
in class Expression
public Expression rebuildOn(Expression newBase)
rebuildOn
in class Expression
Expression.cloneUsing(Expression newBase)
public void setBaseExpression(Expression expression)
expression
- oracle.toplink.essentials.expressions.Expressionpublic void setLocalBase(Expression exp)
Expression
setLocalBase
in class Expression
public void setOperator(ExpressionOperator theOperator)
public void setResultType(Class resultType)
public Expression twistedForBaseAndContext(Expression newBase, Expression context)
twistedForBaseAndContext
in class Expression
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean isObjectUnregistered)
valueFromObject
in class Expression
public void writeDescriptionOn(BufferedWriter writer) throws IOException
writeDescriptionOn
in class Expression
IOException
public void writeFields(ExpressionSQLPrinter printer, Vector newFields, SQLSelectStatement statement)
writeFields
in class Expression
public void writeSubexpressionsTo(BufferedWriter writer, int indent) throws IOException
writeSubexpressionsTo
in class Expression
IOException
Copyright © 2023. All rights reserved.