Module org.eclipse.persistence.core
Class ExtractOperator
- java.lang.Object
-
- org.eclipse.persistence.expressions.ExpressionOperator
-
- org.eclipse.persistence.internal.expressions.ExtractOperator
-
- All Implemented Interfaces:
Serializable
public class ExtractOperator extends ExpressionOperator
Expression operator customization forEXTRACT(<date-time-part> FROM <date-time>). Contains support for platform specific native SQL override for individual<date-time-part>values.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.expressions.ExpressionOperator
Abs, Acos, Add, AddDate, AddMonths, AggregateOperator, All, allInternalOperators, allOperators, And, Any, argumentIndices, As, Ascending, Ascii, Asin, Atan, Atan2, Average, Between, Case, CaseCondition, Cast, Ceil, CharIndex, CharLength, Chr, Coalesce, ComparisonOperator, Concat, Cos, Cosh, Cot, Count, CurrentDate, CurrentTime, DateDifference, DateName, DatePart, DateToString, Decode, Deref, Descending, Difference, Distinct, Divide, Equal, EqualOuterJoin, Except, ExceptAll, Exists, ExistsNode, Exp, Extract, ExtractValue, ExtractXml, Floor, FunctionOperator, GetNumberVal, GetStringVal, GreaterThan, GreaterThanEqual, Greatest, HexToRaw, In, Initcap, Instring, InSubQuery, Intersect, IntersectAll, isBindingSupported, IsFragment, IsNull, isPrefix, isRepeating, javaStrings, LastDay, Least, LeftPad, LeftTrim, LeftTrim2, Length, LessThan, LessThanEqual, Like, LikeEscape, Ln, LocalDate, LocalDateTime, LocalTime, Locate, Locate2, Log, LogicalOperator, Maximum, Minimum, Mod, MonthsBetween, Multiply, name, Negate, NewTime, NextDay, nodeClass, Not, NotBetween, NotEqual, NotExists, NotIn, NotInSubQuery, NotLike, NotLikeEscape, NotNull, NullIf, NullsFirst, NullsLast, Nvl, Or, OrderOperator, platformOperatorNames, platformOperatorSelectors, Power, Ref, RefToHex, Regexp, Replace, Replicate, Reverse, Right, RightPad, RightTrim, RightTrim2, Round, RoundDate, SDO_FILTER, SDO_NN, SDO_RELATE, SDO_WITHIN_DISTANCE, selector, Sign, Sin, Sinh, Some, Soundex, Sqrt, StandardDeviation, Substring, SubstringSingleArg, Subtract, Sum, Tan, Tanh, ToChar, ToCharWithFormat, ToDate, Today, ToLowerCase, ToNumber, ToUpperCase, Translate, Trim, Trim2, Trunc, TruncateDate, type, Union, UnionAll, Value, Variance
-
-
Constructor Summary
Constructors Modifier Constructor Description ExtractOperator()Creates an instance ofExtractOperatorexpression.protectedExtractOperator(List<String> dbStrings)Creates an instance ofExtractOperatorexpression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprintCollection(List<Expression> items, ExpressionSQLPrinter printer)INTERNAL: Print the collection onto the SQL stream.protected voidprintDayJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for DAY (<date-time-part>argument.protected voidprintDaySQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for DAY (<date-time-part>argument.voidprintDuo(Expression first, Expression second, ExpressionSQLPrinter printer)INTERNAL: For performance, special case printing two children, since it's by far the most commonprotected voidprintHourJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for HOUR (<date-time-part>argument.protected voidprintHourSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for HOUR (<date-time-part>argument.voidprintJavaCollection(List<Expression> items, ExpressionJavaPrinter printer)INTERNAL: Print the collection onto the SQL stream.voidprintJavaDuo(Expression first, Expression second, ExpressionJavaPrinter printer)INTERNAL: For performance, special case printing two children, since it's by far the most commonprotected voidprintMinuteJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for MINUTE (<date-time-part>argument.protected voidprintMinuteSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for MINUTE (<date-time-part>argument.protected voidprintMonthJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for MONTH (<date-time-part>argument.protected voidprintMonthSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for MONTH (<date-time-part>argument.protected voidprintQuarterJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for QUARTER (<date-time-part>argument.protected voidprintQuarterSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for QUARTER (<date-time-part>argument.protected voidprintSecondJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for SECOND (<date-time-part>argument.protected voidprintSecondSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for SECOND (<date-time-part>argument.protected voidprintWeekJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for WEEK (<date-time-part>argument.protected voidprintWeekSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for WEEK (<date-time-part>argument.protected voidprintYearJava(Expression first, Expression second, ExpressionJavaPrinter printer)Printer for YEAR (<date-time-part>argument.protected voidprintYearSQL(Expression first, Expression second, ExpressionSQLPrinter printer)Printer for YEAR (<date-time-part>argument.-
Methods inherited from class org.eclipse.persistence.expressions.ExpressionOperator
abs, acos, add, addDate, addMonths, addOperator, all, and, any, applyFunction, as, ascending, ascii, asin, atan, average, bePostfix, bePrefix, beRepeating, between, caseConditionStatement, caseStatement, cast, ceil, charIndex, charLength, chr, clone, coalesce, concat, conformBetween, conformLike, copyTo, cos, cosh, cot, count, createNode, currentDate, currentTime, currentTimeStamp, dateDifference, dateName, datePart, dateToString, decode, deref, descending, difference, distinct, divide, doesRelationConform, equal, equalOuterJoin, equals, except, exceptAll, exists, existsNode, exp, expressionFor, expressionFor, expressionForArguments, expressionForWithBaseLast, extract, extractValue, extractXml, floor, getAllInternalOperators, getAllOperators, getArgumentIndices, getDatabaseStrings, getDatabaseStrings, getInternalOperator, getJavaStrings, getName, getNodeClass, getNumberVal, getOperator, getPlatformOperatorName, getPlatformOperatorNames, getPlatformOperatorSelectors, getSelector, getStringVal, getType, greaterThan, greaterThanEqual, greatest, hashCode, hexToRaw, ifNull, in, initcap, initializeAggregateFunctionOperators, initializeComparisonOperators, initializeFunctionOperators, initializeLogicalOperators, initializeOperators, initializeOrderOperators, initializePlatformOperatorNames, initializePlatformOperatorSelectors, initializeRelationOperators, instring, inSubQuery, intersect, intersectAll, isAggregateOperator, isAll, isAny, isAnyOrAll, isBindingSupported, isComparisonOperator, isComplete, isFragment, isFunctionOperator, isLogicalOperator, isNull, isOrderOperator, isPrefix, lastDay, least, leftPad, leftTrim, leftTrim2, length, lessThan, lessThanEqual, like, likeEscape, ln, localDate, localDateTime, localTime, locate, locate2, log, maximum, minimum, mod, monthsBetween, multiply, negate, newExpressionForArgument, newExpressionForArguments, newExpressionForArgumentWithBaseLast, newTime, nextDay, notBetween, notEqual, notExists, notIn, notInSubQuery, notLike, notLikeEscape, notNull, notOperator, nullIf, nullsFirst, nullsLast, or, power, printsAs, printsAs, printsJavaAs, printsJavaAs, ref, refToHex, regexp, registerOperator, replace, replicate, resetOperators, reverse, right, rightPad, rightTrim, rightTrim2, round, roundDate, setArgumentIndices, setIsBindingSupported, setName, setNodeClass, setSelector, setType, sign, simpleAggregate, simpleFunction, simpleFunction, simpleFunctionNoParentheses, simpleLogical, simpleLogicalNoParens, simpleMath, simpleOrdering, simpleRelation, simpleRelation, simpleThreeArgumentFunction, simpleTwoArgumentFunction, sin, sinh, some, soundex, sqrt, standardDeviation, substring, substringSingleArg, subtract, sum, tan, tanh, toChar, toCharWithFormat, toDate, today, toLowerCase, toNumber, toString, toUpperCase, translate, trim, trim2, trunc, truncateDate, union, unionAll, value, variance
-
-
-
-
Constructor Detail
-
ExtractOperator
public ExtractOperator()
Creates an instance ofExtractOperatorexpression. Default native database Strings are set for EXTRACT expression.
-
ExtractOperator
protected ExtractOperator(List<String> dbStrings)
Creates an instance ofExtractOperatorexpression. Custom native database Strings are set for EXTRACT expression.- Parameters:
dbStrings- native database Strings
-
-
Method Detail
-
printYearSQL
protected void printYearSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for YEAR (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printQuarterSQL
protected void printQuarterSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for QUARTER (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printMonthSQL
protected void printMonthSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for MONTH (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printWeekSQL
protected void printWeekSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for WEEK (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printDaySQL
protected void printDaySQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for DAY (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printHourSQL
protected void printHourSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for HOUR (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printMinuteSQL
protected void printMinuteSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for MINUTE (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printSecondSQL
protected void printSecondSQL(Expression first, Expression second, ExpressionSQLPrinter printer)
Printer for SECOND (<date-time-part>argument. This method shall be overriden to implement platform specific SQL printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printDuo
public void printDuo(Expression first, Expression second, ExpressionSQLPrinter printer)
Description copied from class:ExpressionOperatorINTERNAL: For performance, special case printing two children, since it's by far the most common- Overrides:
printDuoin classExpressionOperator
-
printCollection
public void printCollection(List<Expression> items, ExpressionSQLPrinter printer)
Description copied from class:ExpressionOperatorINTERNAL: Print the collection onto the SQL stream.- Overrides:
printCollectionin classExpressionOperator
-
printYearJava
protected void printYearJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for YEAR (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printQuarterJava
protected void printQuarterJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for QUARTER (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printMonthJava
protected void printMonthJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for MONTH (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printWeekJava
protected void printWeekJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for WEEK (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printDayJava
protected void printDayJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for DAY (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printHourJava
protected void printHourJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for HOUR (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printMinuteJava
protected void printMinuteJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for MINUTE (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printSecondJava
protected void printSecondJava(Expression first, Expression second, ExpressionJavaPrinter printer)
Printer for SECOND (<date-time-part>argument. This method shall be overriden to implement platform specific Java printer.- Parameters:
first- first expression (<date-time>argument)second- second expression (<date-time-part>argument)printer- target printer
-
printJavaDuo
public void printJavaDuo(Expression first, Expression second, ExpressionJavaPrinter printer)
Description copied from class:ExpressionOperatorINTERNAL: For performance, special case printing two children, since it's by far the most common- Overrides:
printJavaDuoin classExpressionOperator
-
printJavaCollection
public void printJavaCollection(List<Expression> items, ExpressionJavaPrinter printer)
Description copied from class:ExpressionOperatorINTERNAL: Print the collection onto the SQL stream.- Overrides:
printJavaCollectionin classExpressionOperator
-
-