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