Class ExpressionOperator
java.lang.Object
org.eclipse.persistence.expressions.ExpressionOperator
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ListExpressionOperator
Purpose: ADVANCED: The expression operator is used internally to define SQL operations and functions. It is possible for an advanced user to define their own operators.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
protected static Map<Integer,
ExpressionOperator> Contains internal defined operators meant as placeholders for platform operatorsprotected static Map<Integer,
ExpressionOperator> static final int
Logical operatorsstatic final int
protected int[]
Contains user defined operatorsstatic final int
static final int
Ordering operatorsstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Aggregate operatorsstatic final int
Function to obtain the current date on the database with date components only but without time components.static final int
Function to obtain the current time on the database with time components only but without date components.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Comparison operatorsstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected Boolean
Allow operator to disable/enable binding for the whole expression.static final int
static final int
protected boolean
protected boolean
protected String[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Operator typesstatic final int
static final int
static final int
static final int
static final int
protected String
static final int
static final int
static final int
protected Class
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Function to obtain the current timestamp on the database including date and time components.static final int
static final int
static final int
Function operatorsstatic final int
static final int
static final int
static final int
static final int
protected int
static final int
Union operatorsstatic final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionADVANCED: Create a new operator.ExpressionOperator
(int selector, List<String> newDatabaseStrings) ADVANCED: Create a new operator with the given name(s) and strings to print. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionOperator
abs()
INTERNAL: Build operator.static ExpressionOperator
acos()
INTERNAL: Build operator.static ExpressionOperator
add()
INTERNAL: Build operator.static ExpressionOperator
addDate()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static void
addOperator
(ExpressionOperator exOperator) ADVANCED: Add an operator to the user defined list of operators.static ExpressionOperator
all()
INTERNAL: Create the ALL operator.static ExpressionOperator
and()
INTERNAL: Create the AND operator.static ExpressionOperator
any()
INTERNAL: Create the ANY operator.applyFunction
(Object source, List arguments) INTERNAL: Apply this to an object in memory.static ExpressionOperator
as()
INTERNAL: Create the AS operator.static ExpressionOperator
INTERNAL: Create the ASCENDING operator.static ExpressionOperator
ascii()
INTERNAL: Build operator.static ExpressionOperator
asin()
INTERNAL: Build operator.static ExpressionOperator
atan()
INTERNAL: Build operator.static ExpressionOperator
average()
INTERNAL: Create the AVERAGE operator.void
ADVANCED: Tell the operator to be postfix, i.e.void
bePrefix()
ADVANCED: Tell the operator to be pretfix, i.e.void
INTERNAL: Make this a repeating argument.static ExpressionOperator
between()
INTERNAL: Create the BETWEEN Operatorstatic ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
cast()
INTERNAL: Build operator.static ExpressionOperator
ceil()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
chr()
INTERNAL: Build operator.clone()
static ExpressionOperator
coalesce()
INTERNAL: Build operator.static ExpressionOperator
concat()
INTERNAL: Build operator.boolean
conformBetween
(Object left, Object right) INTERNAL: Compare between in memory.boolean
conformLike
(Object left, Object right) INTERNAL: Compare like in memory.void
copyTo
(ExpressionOperator operator) static ExpressionOperator
cos()
INTERNAL: Build operator.static ExpressionOperator
cosh()
INTERNAL: Build operator.static ExpressionOperator
cot()
INTERNAL: Build operator.static ExpressionOperator
count()
INTERNAL: Create the COUNT operator.protected Expression
INTERNAL: Instantiate an instance of the operator's node class.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
dateName()
INTERNAL: Build operator.static ExpressionOperator
datePart()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
decode()
INTERNAL: Build operator.static ExpressionOperator
deref()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the DESCENDING operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
distinct()
INTERNAL: Create the DISTINCT operator.static ExpressionOperator
divide()
INTERNAL: Create the DISTINCT operator.boolean
doesRelationConform
(Object left, Object right) INTERNAL: Compare the values in memory.static ExpressionOperator
equal()
static ExpressionOperator
INTERNAL: Initialize the outer join operator Note: This is merely a shell which is incomplete, and so will be replaced by the platform's operator when we go to print.boolean
INTERNAL: Return if the operator is equal to the other.static ExpressionOperator
except()
INTERNAL: Create the EXCEPT operator.static ExpressionOperator
INTERNAL: Create the EXCEPT ALL operator.static ExpressionOperator
exists()
INTERNAL: Create the EXISTS operator.static ExpressionOperator
INTERNAL: Create the existsNode expression operatorstatic ExpressionOperator
exp()
INTERNAL: Build operator.expressionFor
(Expression base) INTERNAL: Create an expression for this operator, using the given base.expressionFor
(Expression base, Object value) INTERNAL: Create an expression for this operator, using the given base and a single argument.expressionForArguments
(Expression base, List arguments) INTERNAL: Create an expression for this operator, using the given base and arguments.expressionForWithBaseLast
(Expression base, Object value) INTERNAL: Create an expression for this operator, using the given base and a single argument.static ExpressionOperator
extract()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the extractValue expression operatorstatic ExpressionOperator
INTERNAL: Create the extract expression operatorstatic ExpressionOperator
floor()
INTERNAL: Build operator.static Map<Integer,
ExpressionOperator> INTERNAL:static Map<Integer,
ExpressionOperator> ADVANCED: Return the map of all operators.String[]
Deprecated.String[]
getDatabaseStrings
(int arguments) INTERNAL:static ExpressionOperator
getInternalOperator
(Integer selector) INTERNAL: Lookup the internal operator with the given id.String[]
INTERNAL:getName()
INTERNAL: Return the name.INTERNAL:static ExpressionOperator
static ExpressionOperator
getOperator
(Integer selector) INTERNAL: Lookup the operator with the given id.static String
getPlatformOperatorName
(int operator) INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions.static Map
INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions.int
INTERNAL: Return the selector id.static ExpressionOperator
int
getType()
ADVANCED: Return the type of function.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
greatest()
INTERNAL: Build operator.int
hashCode()
INTERNAL: Return the hash-code based on the unique selector.static ExpressionOperator
hexToRaw()
INTERNAL: Build operator.static ExpressionOperator
ifNull()
INTERNAL: Build operator.static ExpressionOperator
in()
INTERNAL: Create the IN operator.static ExpressionOperator
initcap()
INTERNAL: Build operator.protected static void
INTERNAL:protected static void
INTERNAL:protected static void
INTERNAL:protected static void
INTERNAL:static Map
INTERNAL:protected static void
INTERNAL:INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions.INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions.protected static void
INTERNAL:static ExpressionOperator
instring()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the IN operator taking a subquery.static ExpressionOperator
INTERNAL: Create the INTERSECT operator.static ExpressionOperator
INTERNAL: Create the INTERSECT ALL operator.boolean
Aggregate functions are function in the select such as COUNT.boolean
isAll()
INTERNAL: Indicates whether operator has selector Allboolean
isAny()
INTERNAL: Indicates whether operator has selector Any or Someboolean
INTERNAL: Indicates whether operator has selector Any, Some or AllDeprecated.boolean
Comparison functions are functions such as = and >.boolean
INTERNAL: If we have all the required information, this operator is complete and can be used as is.static ExpressionOperator
boolean
General functions are any normal function such as UPPER.boolean
Logical functions are functions such as and and or.static ExpressionOperator
isNull()
INTERNAL: Create the ISNULL operator.boolean
Order functions are used in the order by such as ASC.boolean
isPrefix()
ADVANCED: Return true if this is a prefix operator.static ExpressionOperator
lastDay()
INTERNAL: Build operator.static ExpressionOperator
least()
INTERNAL: Build operator.static ExpressionOperator
leftPad()
INTERNAL: Build operator.static ExpressionOperator
leftTrim()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build leftTrim operator that takes one parameter.static ExpressionOperator
length()
INTERNAL: Build operator.static ExpressionOperator
lessThan()
static ExpressionOperator
static ExpressionOperator
like()
INTERNAL: Create the LIKE operator.static ExpressionOperator
INTERNAL: Create the LIKE operator with ESCAPE.static ExpressionOperator
ln()
INTERNAL: Build operator.static ExpressionOperator
locate()
INTERNAL: Build locate operator i.e.static ExpressionOperator
locate2()
INTERNAL: Build locate operator with 3 params i.e.static ExpressionOperator
log()
INTERNAL: Build operator.static ExpressionOperator
maximum()
INTERNAL: Create the MAXIMUM operator.static ExpressionOperator
minimum()
INTERNAL: Create the MINIMUM operator.static ExpressionOperator
mod()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
multiply()
INTERNAL: Build operator.static ExpressionOperator
negate()
INTERNAL: Build operator.newExpressionForArgument
(Expression base, Object singleArgument) INTERNAL: Create a new expression.newExpressionForArguments
(Expression base, List arguments) INTERNAL: The general case.newExpressionForArgumentWithBaseLast
(Expression base, Object singleArgument) INTERNAL: Create a new expression.static ExpressionOperator
newTime()
INTERNAL: Build operator.static ExpressionOperator
nextDay()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the NOT BETWEEN Operatorstatic ExpressionOperator
notEqual()
static ExpressionOperator
INTERNAL: Create the NOT EXISTS operator.static ExpressionOperator
notIn()
INTERNAL: Create the NOTIN operator.static ExpressionOperator
INTERNAL: Create the NOTIN operator taking a subQuery.static ExpressionOperator
notLike()
INTERNAL: Create the NOTLIKE operator.static ExpressionOperator
INTERNAL: Create the LIKE operator with ESCAPE.static ExpressionOperator
notNull()
INTERNAL: Create the NOTNULL operator.static ExpressionOperator
INTERNAL: Create the NOT operator.static ExpressionOperator
nullIf()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the NULLS FIRST ordering operator.static ExpressionOperator
INTERNAL: Create the NULLS LAST ordering operator.static ExpressionOperator
or()
INTERNAL: Create the OR operator.static ExpressionOperator
Deprecated.static ExpressionOperator
power()
INTERNAL: Build operator.void
printCollection
(List<Expression> items, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer) INTERNAL: Print the collection onto the SQL stream.void
printDuo
(Expression first, Expression second, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer) INTERNAL: For performance, special case printing two children, since it's by far the most commonvoid
printJavaCollection
(List<Expression> items, org.eclipse.persistence.internal.expressions.ExpressionJavaPrinter printer) INTERNAL: Print the collection onto the SQL stream.void
printJavaDuo
(Expression first, Expression second, org.eclipse.persistence.internal.expressions.ExpressionJavaPrinter printer) INTERNAL: For performance, special case printing two children, since it's by far the most commonvoid
ADVANCED: Set the single string for this operator.void
ADVANCED: Set the strings for this operator.void
ADVANCED: Set the single string for this operator.void
printsJavaAs
(List<String> dbStrings) ADVANCED: Set the strings for this operator.static ExpressionOperator
ref()
INTERNAL: Build operator.static ExpressionOperator
refToHex()
INTERNAL: Build operator.static ExpressionOperator
regexp()
INTERNAL: Create the REGEXP operator.static void
registerOperator
(int selector, String name) ADVANCED: Define a name for a user defined operator.static ExpressionOperator
replace()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static void
INTERNAL: Reset all the operators.static ExpressionOperator
reverse()
INTERNAL: Build operator.static ExpressionOperator
right()
INTERNAL: Build operator.static ExpressionOperator
rightPad()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build rightTrim operator that takes one parameter.static ExpressionOperator
round()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.void
setArgumentIndices
(int[] indices) ADVANCED: Set the array of indexes to use when building the SQL function.void
setIsBindingSupported
(Boolean isBindingSupported) Deprecated.void
INTERNAL: Set the name.void
setNodeClass
(Class nodeClass) ADVANCED: Set the node class for this operator.void
setSelector
(int selector) INTERNAL: Set the selector id.void
setType
(int type) ADVANCED: Set the type of function.static ExpressionOperator
sign()
INTERNAL: Build operator.static ExpressionOperator
simpleAggregate
(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple aggregate given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleFunction
(int selector, String databaseName) INTERNAL: Create an operator for a simple function given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleFunction
(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple function given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleFunctionNoParentheses
(int selector, String databaseName) INTERNAL: Create an operator for a simple function call without parenthesesstatic ExpressionOperator
simpleLogical
(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple logical given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleLogicalNoParens
(int selector, String dbString) INTERNAL: e.g.: ...static ExpressionOperator
simpleMath
(int selector, String databaseName) INTERNAL: Create an operator for a simple math operation, i.e.static ExpressionOperator
simpleOrdering
(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple ordering given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleRelation
(int selector, String databaseName) INTERNAL: Create an operator for a simple relation given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleRelation
(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple relation given a Java name and a single String for the database (parentheses will be added automatically).static ExpressionOperator
simpleThreeArgumentFunction
(int selector, String dbString) INTERNAL: Build operator.static ExpressionOperator
simpleTwoArgumentFunction
(int selector, String dbString) INTERNAL: Build operator.static ExpressionOperator
sin()
INTERNAL: Build operator.static ExpressionOperator
sinh()
INTERNAL: Build operator.static ExpressionOperator
some()
INTERNAL: Create the SOME operator.static ExpressionOperator
soundex()
INTERNAL: Build operator.static ExpressionOperator
sqrt()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
subtract()
static ExpressionOperator
sum()
Create the SUM operator.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
Deprecated.static ExpressionOperator
tan()
INTERNAL: Build operator.static ExpressionOperator
tanh()
INTERNAL: Build operator.static ExpressionOperator
toChar()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
toDate()
INTERNAL: Build operator.static ExpressionOperator
today()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Create the toLowerCase operator.static ExpressionOperator
toNumber()
INTERNAL: Build operator.toString()
Print a debug representation of this operator.static ExpressionOperator
INTERNAL: Create the TOUPPERCASE operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
trim()
INTERNAL: Build operator.static ExpressionOperator
trim2()
INTERNAL: Build Trim operator.static ExpressionOperator
trunc()
INTERNAL: Build operator.static ExpressionOperator
INTERNAL: Build operator.static ExpressionOperator
union()
INTERNAL: Create the UNION operator.static ExpressionOperator
unionAll()
INTERNAL: Create the UNION ALL operator.static ExpressionOperator
value()
INTERNAL: Build operator.static ExpressionOperator
variance()
INTERNAL: Build operator.
-
Field Details
-
selector
protected int selector -
name
-
isPrefix
protected boolean isPrefix -
isRepeating
protected boolean isRepeating -
nodeClass
-
type
protected int type -
argumentIndices
protected int[] argumentIndicesContains user defined operators -
allOperators
-
allInternalOperators
Contains internal defined operators meant as placeholders for platform operators -
platformOperatorSelectors
-
platformOperatorNames
-
javaStrings
-
isBindingSupported
Allow operator to disable/enable binding for the whole expression. Set to 'null' to enable `isArgumentBindingSupported` finer detail. -
LogicalOperator
public static final int LogicalOperatorOperator types- See Also:
-
ComparisonOperator
public static final int ComparisonOperator- See Also:
-
AggregateOperator
public static final int AggregateOperator- See Also:
-
OrderOperator
public static final int OrderOperator- See Also:
-
FunctionOperator
public static final int FunctionOperator- See Also:
-
And
public static final int AndLogical operators- See Also:
-
Or
public static final int Or- See Also:
-
Not
public static final int Not- See Also:
-
Equal
public static final int EqualComparison operators- See Also:
-
NotEqual
public static final int NotEqual- See Also:
-
EqualOuterJoin
public static final int EqualOuterJoin- See Also:
-
LessThan
public static final int LessThan- See Also:
-
LessThanEqual
public static final int LessThanEqual- See Also:
-
GreaterThan
public static final int GreaterThan- See Also:
-
GreaterThanEqual
public static final int GreaterThanEqual- See Also:
-
Like
public static final int Like- See Also:
-
NotLike
public static final int NotLike- See Also:
-
In
public static final int In- See Also:
-
InSubQuery
public static final int InSubQuery- See Also:
-
NotIn
public static final int NotIn- See Also:
-
NotInSubQuery
public static final int NotInSubQuery- See Also:
-
Between
public static final int Between- See Also:
-
NotBetween
public static final int NotBetween- See Also:
-
IsNull
public static final int IsNull- See Also:
-
NotNull
public static final int NotNull- See Also:
-
Exists
public static final int Exists- See Also:
-
NotExists
public static final int NotExists- See Also:
-
LikeEscape
public static final int LikeEscape- See Also:
-
NotLikeEscape
public static final int NotLikeEscape- See Also:
-
Decode
public static final int Decode- See Also:
-
Case
public static final int Case- See Also:
-
NullIf
public static final int NullIf- See Also:
-
Coalesce
public static final int Coalesce- See Also:
-
CaseCondition
public static final int CaseCondition- See Also:
-
Regexp
public static final int Regexp- See Also:
-
Count
public static final int CountAggregate operators- See Also:
-
Sum
public static final int Sum- See Also:
-
Average
public static final int Average- See Also:
-
Maximum
public static final int Maximum- See Also:
-
Minimum
public static final int Minimum- See Also:
-
StandardDeviation
public static final int StandardDeviation- See Also:
-
Variance
public static final int Variance- See Also:
-
Distinct
public static final int Distinct- See Also:
-
As
public static final int As- See Also:
-
Union
public static final int UnionUnion operators- See Also:
-
UnionAll
public static final int UnionAll- See Also:
-
Intersect
public static final int Intersect- See Also:
-
IntersectAll
public static final int IntersectAll- See Also:
-
Except
public static final int Except- See Also:
-
ExceptAll
public static final int ExceptAll- See Also:
-
Ascending
public static final int AscendingOrdering operators- See Also:
-
Descending
public static final int Descending- See Also:
-
NullsFirst
public static final int NullsFirst- See Also:
-
NullsLast
public static final int NullsLast- See Also:
-
ToUpperCase
public static final int ToUpperCaseFunction operators- See Also:
-
ToLowerCase
public static final int ToLowerCase- See Also:
-
Chr
public static final int Chr- See Also:
-
Concat
public static final int Concat- See Also:
-
HexToRaw
public static final int HexToRaw- See Also:
-
Initcap
public static final int Initcap- See Also:
-
Instring
public static final int Instring- See Also:
-
Soundex
public static final int Soundex- See Also:
-
LeftPad
public static final int LeftPad- See Also:
-
LeftTrim
public static final int LeftTrim- See Also:
-
Replace
public static final int Replace- See Also:
-
RightPad
public static final int RightPad- See Also:
-
RightTrim
public static final int RightTrim- See Also:
-
Substring
public static final int Substring- See Also:
-
ToNumber
public static final int ToNumber- See Also:
-
Translate
public static final int Translate- See Also:
-
Trim
public static final int Trim- See Also:
-
Ascii
public static final int Ascii- See Also:
-
Length
public static final int Length- See Also:
-
CharIndex
public static final int CharIndex- See Also:
-
CharLength
public static final int CharLength- See Also:
-
Difference
public static final int Difference- See Also:
-
Reverse
public static final int Reverse- See Also:
-
Replicate
public static final int Replicate- See Also:
-
Right
public static final int Right- See Also:
-
Locate
public static final int Locate- See Also:
-
Locate2
public static final int Locate2- See Also:
-
ToChar
public static final int ToChar- See Also:
-
ToCharWithFormat
public static final int ToCharWithFormat- See Also:
-
RightTrim2
public static final int RightTrim2- See Also:
-
Any
public static final int Any- See Also:
-
Some
public static final int Some- See Also:
-
All
public static final int All- See Also:
-
Trim2
public static final int Trim2- See Also:
-
LeftTrim2
public static final int LeftTrim2- See Also:
-
SubstringSingleArg
public static final int SubstringSingleArg- See Also:
-
Cast
public static final int Cast- See Also:
-
Extract
public static final int Extract- See Also:
-
AddMonths
public static final int AddMonths- See Also:
-
DateToString
public static final int DateToString- See Also:
-
LastDay
public static final int LastDay- See Also:
-
MonthsBetween
public static final int MonthsBetween- See Also:
-
NextDay
public static final int NextDay- See Also:
-
RoundDate
public static final int RoundDate- See Also:
-
ToDate
public static final int ToDate- See Also:
-
Today
public static final int TodayFunction to obtain the current timestamp on the database including date and time components. This corresponds to the JPQL function current_timestamp.- See Also:
-
AddDate
public static final int AddDate- See Also:
-
DateName
public static final int DateName- See Also:
-
DatePart
public static final int DatePart- See Also:
-
DateDifference
public static final int DateDifference- See Also:
-
TruncateDate
public static final int TruncateDate- See Also:
-
NewTime
public static final int NewTime- See Also:
-
Nvl
public static final int Nvl- See Also:
-
CurrentDate
public static final int CurrentDateFunction to obtain the current date on the database with date components only but without time components. This corresponds to the JPQL function current_date.- See Also:
-
CurrentTime
public static final int CurrentTimeFunction to obtain the current time on the database with time components only but without date components. This corresponds to the JPQL function current_time.- See Also:
-
Ceil
public static final int Ceil- See Also:
-
Cos
public static final int Cos- See Also:
-
Cosh
public static final int Cosh- See Also:
-
Abs
public static final int Abs- See Also:
-
Acos
public static final int Acos- See Also:
-
Asin
public static final int Asin- See Also:
-
Atan
public static final int Atan- See Also:
-
Exp
public static final int Exp- See Also:
-
Sqrt
public static final int Sqrt- See Also:
-
Floor
public static final int Floor- See Also:
-
Ln
public static final int Ln- See Also:
-
Log
public static final int Log- See Also:
-
Mod
public static final int Mod- See Also:
-
Power
public static final int Power- See Also:
-
Round
public static final int Round- See Also:
-
Sign
public static final int Sign- See Also:
-
Sin
public static final int Sin- See Also:
-
Sinh
public static final int Sinh- See Also:
-
Tan
public static final int Tan- See Also:
-
Tanh
public static final int Tanh- See Also:
-
Trunc
public static final int Trunc- See Also:
-
Greatest
public static final int Greatest- See Also:
-
Least
public static final int Least- See Also:
-
Add
public static final int Add- See Also:
-
Subtract
public static final int Subtract- See Also:
-
Divide
public static final int Divide- See Also:
-
Multiply
public static final int Multiply- See Also:
-
Atan2
public static final int Atan2- See Also:
-
Cot
public static final int Cot- See Also:
-
Negate
public static final int Negate- See Also:
-
Deref
public static final int Deref- See Also:
-
Ref
public static final int Ref- See Also:
-
RefToHex
public static final int RefToHex- See Also:
-
Value
public static final int Value- See Also:
-
ExtractXml
public static final int ExtractXml- See Also:
-
ExtractValue
public static final int ExtractValue- See Also:
-
ExistsNode
public static final int ExistsNode- See Also:
-
GetStringVal
public static final int GetStringVal- See Also:
-
GetNumberVal
public static final int GetNumberVal- See Also:
-
IsFragment
public static final int IsFragment- See Also:
-
SDO_WITHIN_DISTANCE
public static final int SDO_WITHIN_DISTANCE- See Also:
-
SDO_RELATE
public static final int SDO_RELATE- See Also:
-
SDO_FILTER
public static final int SDO_FILTER- See Also:
-
SDO_NN
public static final int SDO_NN- See Also:
-
-
Constructor Details
-
ExpressionOperator
public ExpressionOperator()ADVANCED: Create a new operator. -
ExpressionOperator
ADVANCED: Create a new operator with the given name(s) and strings to print.
-
-
Method Details
-
isBindingSupported
Deprecated.PUBLIC: Return if binding is compatible with this operator. -
setIsBindingSupported
Deprecated.PUBLIC: Set if binding is compatible with this operator. Some databases do not allow binding, or require casting with certain operators. -
equals
INTERNAL: Return if the operator is equal to the other. -
hashCode
public int hashCode()INTERNAL: Return the hash-code based on the unique selector. -
abs
INTERNAL: Build operator. -
acos
INTERNAL: Build operator. -
add
INTERNAL: Build operator. -
addDate
INTERNAL: Build operator. -
addMonths
INTERNAL: Build operator. -
addOperator
ADVANCED: Add an operator to the user defined list of operators. -
registerOperator
ADVANCED: Define a name for a user defined operator. -
and
INTERNAL: Create the AND operator. -
applyFunction
INTERNAL: Apply this to an object in memory. Throw an error if the function is not supported. -
ascending
INTERNAL: Create the ASCENDING operator. -
as
INTERNAL: Create the AS operator. -
nullsFirst
INTERNAL: Create the NULLS FIRST ordering operator. -
nullsLast
INTERNAL: Create the NULLS LAST ordering operator. -
ascii
INTERNAL: Build operator. -
asin
INTERNAL: Build operator. -
atan
INTERNAL: Build operator. -
average
INTERNAL: Create the AVERAGE operator. -
bePostfix
public void bePostfix()ADVANCED: Tell the operator to be postfix, i.e. its strings start printing after those of its first argument. -
bePrefix
public void bePrefix()ADVANCED: Tell the operator to be pretfix, i.e. its strings start printing before those of its first argument. -
beRepeating
public void beRepeating()INTERNAL: Make this a repeating argument. Currently unused. -
between
INTERNAL: Create the BETWEEN Operator -
notBetween
INTERNAL: Create the NOT BETWEEN Operator -
caseStatement
INTERNAL: Build operator. Note: This operator works differently from other operators.- See Also:
-
caseConditionStatement
INTERNAL: Build operator. Note: This operator works differently from other operators.- See Also:
-
ceil
INTERNAL: Build operator. -
charIndex
INTERNAL: Build operator. -
charLength
INTERNAL: Build operator. -
chr
INTERNAL: Build operator. -
coalesce
INTERNAL: Build operator. Note: This operator works differently from other operators.- See Also:
-
concat
INTERNAL: Build operator. -
conformBetween
INTERNAL: Compare between in memory. -
conformLike
INTERNAL: Compare like in memory. This only works for % not _. -
clone
-
copyTo
-
cos
INTERNAL: Build operator. -
cosh
INTERNAL: Build operator. -
cot
INTERNAL: Build operator. -
count
INTERNAL: Create the COUNT operator. -
dateDifference
INTERNAL: Build operator. -
dateName
INTERNAL: Build operator. -
oracleDateName
Deprecated.INTERNAL: Oracle equivalent to DATENAME is TO_CHAR. -
datePart
INTERNAL: Build operator. -
dateToString
INTERNAL: Build operator. -
toChar
INTERNAL: Build operator. -
toCharWithFormat
INTERNAL: Build operator. -
decode
INTERNAL: Build operator. Note: This operator works differently from other operators.- See Also:
-
deref
INTERNAL: Build operator. -
descending
INTERNAL: Create the DESCENDING operator. -
difference
INTERNAL: Build operator. -
distinct
INTERNAL: Create the DISTINCT operator. -
divide
INTERNAL: Create the DISTINCT operator. -
doesRelationConform
INTERNAL: Compare the values in memory. Used for in-memory querying, all operators are not support. -
equal
-
equalOuterJoin
INTERNAL: Initialize the outer join operator Note: This is merely a shell which is incomplete, and so will be replaced by the platform's operator when we go to print. We need to create this here so that the expression class is correct, normally it assumes functions for unknown operators. -
exists
INTERNAL: Create the EXISTS operator. -
exp
INTERNAL: Build operator. -
expressionFor
INTERNAL: Create an expression for this operator, using the given base. -
expressionFor
INTERNAL: Create an expression for this operator, using the given base and a single argument. -
expressionForWithBaseLast
INTERNAL: Create an expression for this operator, using the given base and a single argument. Base is used last in the expression -
expressionForArguments
INTERNAL: Create an expression for this operator, using the given base and arguments. -
extractXml
INTERNAL: Create the extract expression operator -
extractValue
INTERNAL: Create the extractValue expression operator -
existsNode
INTERNAL: Create the existsNode expression operator -
getStringVal
-
getNumberVal
-
isFragment
-
floor
INTERNAL: Build operator. -
getAllOperators
ADVANCED: Return the map of all operators. -
getAllInternalOperators
INTERNAL: -
getPlatformOperatorSelectors
-
getDatabaseStrings
Deprecated.INTERNAL: -
getDatabaseStrings
INTERNAL: -
getJavaStrings
INTERNAL: -
getNodeClass
INTERNAL: -
getOperator
INTERNAL: Lookup the operator with the given id.This will only check user defined operators. For operators defined internally, see
ExpressionOperator#getInternalOperator()
-
getInternalOperator
INTERNAL: Lookup the internal operator with the given id. -
getSelector
public int getSelector()INTERNAL: Return the selector id. -
getName
INTERNAL: Return the name. -
setName
INTERNAL: Set the name. -
getType
public int getType()ADVANCED: Return the type of function. This must be one of the static function types defined in this class. -
greaterThan
INTERNAL: Build operator. -
greaterThanEqual
INTERNAL: Build operator. -
greatest
INTERNAL: Build operator. -
hexToRaw
INTERNAL: Build operator. -
ifNull
INTERNAL: Build operator. -
in
INTERNAL: Create the IN operator. -
inSubQuery
INTERNAL: Create the IN operator taking a subquery. Note, the subquery itself comes with parenethesis, so the IN operator should not add any parenethesis. -
initcap
INTERNAL: Build operator. -
initializeAggregateFunctionOperators
protected static void initializeAggregateFunctionOperators()INTERNAL: -
initializeComparisonOperators
protected static void initializeComparisonOperators()INTERNAL: -
initializeFunctionOperators
protected static void initializeFunctionOperators()INTERNAL: -
initializeLogicalOperators
protected static void initializeLogicalOperators()INTERNAL: -
initializeOrderOperators
protected static void initializeOrderOperators()INTERNAL: -
initializeRelationOperators
protected static void initializeRelationOperators()INTERNAL: -
initializeOperators
INTERNAL: -
getPlatformOperatorName
INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions. -
getPlatformOperatorNames
INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions. -
initializePlatformOperatorNames
INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions. -
initializePlatformOperatorSelectors
INTERNAL: Initialize a mapping to the platform operator names for usage with exceptions. -
instring
INTERNAL: Build operator. -
isAggregateOperator
public boolean isAggregateOperator()Aggregate functions are function in the select such as COUNT. -
isComparisonOperator
public boolean isComparisonOperator()Comparison functions are functions such as = and >. -
isComplete
public boolean isComplete()INTERNAL: If we have all the required information, this operator is complete and can be used as is. Otherwise we will need to look up a platform- specific operator. -
isFunctionOperator
public boolean isFunctionOperator()General functions are any normal function such as UPPER. -
isLogicalOperator
public boolean isLogicalOperator()Logical functions are functions such as and and or. -
isNull
INTERNAL: Create the ISNULL operator. -
isOrderOperator
public boolean isOrderOperator()Order functions are used in the order by such as ASC. -
isPrefix
public boolean isPrefix()ADVANCED: Return true if this is a prefix operator. -
lastDay
INTERNAL: Build operator. -
least
INTERNAL: Build operator. -
leftPad
INTERNAL: Build operator. -
leftTrim
INTERNAL: Build operator. -
leftTrim2
INTERNAL: Build leftTrim operator that takes one parameter. -
length
INTERNAL: Build operator. -
lessThan
-
lessThanEqual
-
like
INTERNAL: Create the LIKE operator. -
regexp
INTERNAL: Create the REGEXP operator. REGEXP allows for comparison through regular expression, this is supported by many databases and with be part of the next SQL standard. -
likeEscape
INTERNAL: Create the LIKE operator with ESCAPE. -
notLikeEscape
INTERNAL: Create the LIKE operator with ESCAPE. -
ln
INTERNAL: Build operator. -
locate
INTERNAL: Build locate operator i.e. LOCATE("ob", t0.F_NAME) -
locate2
INTERNAL: Build locate operator with 3 params i.e. LOCATE("coffee", t0.DESCRIP, 4). Last parameter is a start at. -
log
INTERNAL: Build operator. -
maximum
INTERNAL: Create the MAXIMUM operator. -
minimum
INTERNAL: Create the MINIMUM operator. -
mod
INTERNAL: Build operator. -
monthsBetween
INTERNAL: Build operator. -
multiply
INTERNAL: Build operator. -
newExpressionForArgument
INTERNAL: Create a new expression. Optimized for the single argument case. -
createNode
INTERNAL: Instantiate an instance of the operator's node class. -
newExpressionForArgumentWithBaseLast
INTERNAL: Create a new expression. Optimized for the single argument case with base last -
newExpressionForArguments
INTERNAL: The general case. -
negate
INTERNAL: Build operator. -
newTime
INTERNAL: Build operator. -
nextDay
INTERNAL: Build operator. -
notEqual
-
notExists
INTERNAL: Create the NOT EXISTS operator. -
notIn
INTERNAL: Create the NOTIN operator. -
notInSubQuery
INTERNAL: Create the NOTIN operator taking a subQuery. Note, the subquery itself comes with parenethesis, so the IN operator should not add any parenethesis. -
notLike
INTERNAL: Create the NOTLIKE operator. -
notNull
INTERNAL: Create the NOTNULL operator. -
notOperator
INTERNAL: Create the NOT operator. -
nullIf
INTERNAL: Build operator. -
or
INTERNAL: Create the OR operator. -
power
INTERNAL: Build operator. -
printCollection
public void printCollection(List<Expression> items, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer) INTERNAL: Print the collection onto the SQL stream. -
printJavaCollection
public void printJavaCollection(List<Expression> items, org.eclipse.persistence.internal.expressions.ExpressionJavaPrinter printer) INTERNAL: Print the collection onto the SQL stream. -
printDuo
public void printDuo(Expression first, Expression second, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer) INTERNAL: For performance, special case printing two children, since it's by far the most common -
printJavaDuo
public void printJavaDuo(Expression first, Expression second, org.eclipse.persistence.internal.expressions.ExpressionJavaPrinter printer) INTERNAL: For performance, special case printing two children, since it's by far the most common -
printsAs
ADVANCED: Set the single string for this operator. -
printsAs
ADVANCED: Set the strings for this operator. -
printsJavaAs
ADVANCED: Set the single string for this operator. -
printsJavaAs
ADVANCED: Set the strings for this operator. -
ref
INTERNAL: Build operator. -
refToHex
INTERNAL: Build operator. -
replace
INTERNAL: Build operator. -
replicate
INTERNAL: Build operator. -
resetOperators
public static void resetOperators()INTERNAL: Reset all the operators. -
reverse
INTERNAL: Build operator. -
right
INTERNAL: Build operator. -
rightPad
INTERNAL: Build operator. -
rightTrim
INTERNAL: Build operator. -
rightTrim2
INTERNAL: Build rightTrim operator that takes one parameter. -
round
INTERNAL: Build operator. -
roundDate
INTERNAL: Build operator. -
setArgumentIndices
public void setArgumentIndices(int[] indices) ADVANCED: Set the array of indexes to use when building the SQL function. The index of the array is the position in the printout, from left to right, starting with zero. The value of the array entry is the number of the argument to print at that particular output position. So each argument can be used zero, one or many times. -
setNodeClass
ADVANCED: Set the node class for this operator. For user-defined functions this is set automatically but can be changed.A list of Operator types, an example, and the node class used follows.
LogicalOperator AND LogicalExpression
ComparisonOperator <> RelationExpression
AggregateOperator COUNT FunctionExpression
OrderOperator ASCENDING "
FunctionOperator RTRIM "
Node classes given belong to org.eclipse.persistence.internal.expressions.
-
setSelector
public void setSelector(int selector) INTERNAL: Set the selector id. -
setType
public void setType(int type) ADVANCED: Set the type of function. This must be one of the static function types defined in this class. -
sign
INTERNAL: Build operator. -
simpleAggregate
public static ExpressionOperator simpleAggregate(int selector, String databaseName, String javaName) INTERNAL: Create an operator for a simple aggregate given a Java name and a single String for the database (parentheses will be added automatically). -
simpleFunction
INTERNAL: Create an operator for a simple function given a Java name and a single String for the database (parentheses will be added automatically). -
simpleFunctionNoParentheses
INTERNAL: Create an operator for a simple function call without parentheses -
simpleFunction
INTERNAL: Create an operator for a simple function given a Java name and a single String for the database (parentheses will be added automatically). -
simpleLogical
INTERNAL: Create an operator for a simple logical given a Java name and a single String for the database (parentheses will be added automatically). -
simpleMath
INTERNAL: Create an operator for a simple math operation, i.e. +, -, *, / -
simpleOrdering
INTERNAL: Create an operator for a simple ordering given a Java name and a single String for the database (parentheses will be added automatically). -
simpleRelation
INTERNAL: Create an operator for a simple relation given a Java name and a single String for the database (parentheses will be added automatically). -
simpleRelation
INTERNAL: Create an operator for a simple relation given a Java name and a single String for the database (parentheses will be added automatically). -
simpleThreeArgumentFunction
INTERNAL: Build operator. -
simpleTwoArgumentFunction
INTERNAL: Build operator. -
simpleLogicalNoParens
INTERNAL: e.g.: ... "Bob" CONCAT "Smith" ... Parentheses will not be addded. [RMB - March 5 2000] -
sin
INTERNAL: Build operator. -
sinh
INTERNAL: Build operator. -
soundex
INTERNAL: Build operator. -
sqrt
INTERNAL: Build operator. -
standardDeviation
INTERNAL: Build operator. -
substring
INTERNAL: Build operator. -
substringSingleArg
INTERNAL: Build operator. -
subtract
-
sum
Create the SUM operator. -
sybaseAddMonthsOperator
Deprecated.INTERNAL: Function, to add months to a date. -
sybaseAtan2Operator
Deprecated.INTERNAL: Build operator. -
sybaseInStringOperator
Deprecated.INTERNAL: Build instring operator -
sybaseToNumberOperator
Deprecated.INTERNAL: Build Sybase equivalent to TO_NUMBER. -
sybaseToDateToStringOperator
Deprecated.INTERNAL: Build Sybase equivalent to TO_CHAR. -
sybaseToDateOperator
Deprecated.INTERNAL: Build Sybase equivalent to TO_DATE. -
sybaseToCharOperator
Deprecated.INTERNAL: Build Sybase equivalent to TO_CHAR. -
sybaseToCharWithFormatOperator
Deprecated.INTERNAL: Build Sybase equivalent to TO_CHAR. -
sybaseLocateOperator
Deprecated.INTERNAL: Build the Sybase equivalent to Locate -
sybaseLocate2Operator
Deprecated.INTERNAL: Build the Sybase equivalent to Locate with a start index. Sybase does not define this, so this gets a little complex... -
tan
INTERNAL: Build operator. -
tanh
INTERNAL: Build operator. -
toDate
INTERNAL: Build operator. -
today
INTERNAL: Build operator. -
currentTimeStamp
INTERNAL: Build operator. -
currentDate
INTERNAL: Build operator. -
currentTime
INTERNAL: Build operator. -
toLowerCase
INTERNAL: Create the toLowerCase operator. -
toNumber
INTERNAL: Build operator. -
toString
Print a debug representation of this operator. -
toUpperCase
INTERNAL: Create the TOUPPERCASE operator. -
translate
INTERNAL: Build operator. -
trim
INTERNAL: Build operator. -
trim2
INTERNAL: Build Trim operator. -
trunc
INTERNAL: Build operator. -
truncateDate
INTERNAL: Build operator. -
cast
INTERNAL: Build operator. -
extract
INTERNAL: Build operator. -
value
INTERNAL: Build operator. -
variance
INTERNAL: Build operator. -
any
INTERNAL: Create the ANY operator. -
some
INTERNAL: Create the SOME operator. -
all
INTERNAL: Create the ALL operator. -
union
INTERNAL: Create the UNION operator. -
unionAll
INTERNAL: Create the UNION ALL operator. -
intersect
INTERNAL: Create the INTERSECT operator. -
intersectAll
INTERNAL: Create the INTERSECT ALL operator. -
except
INTERNAL: Create the EXCEPT operator. -
exceptAll
INTERNAL: Create the EXCEPT ALL operator. -
isAny
public boolean isAny()INTERNAL: Indicates whether operator has selector Any or Some -
isAll
public boolean isAll()INTERNAL: Indicates whether operator has selector All -
isAnyOrAll
public boolean isAnyOrAll()INTERNAL: Indicates whether operator has selector Any, Some or All
-