Package org.apache.cayenne.exp.parser
Class ExpressionParser
java.lang.Object
org.apache.cayenne.exp.parser.ExpressionParser
- All Implemented Interfaces:
ExpressionParserConstants,ExpressionParserTreeConstants
public class ExpressionParser
extends Object
implements ExpressionParserTreeConstants, ExpressionParserConstants
Parser of Cayenne Expressions.
- Since:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.protected JJTExpressionParserStateCurrent token.Generated Token Manager.Fields inherited from interface org.apache.cayenne.exp.parser.ExpressionParserConstants
ABS, ASTERISK, AVG, CONCAT, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DAY, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, DEC_DIGITS, DEC_FLT, DEFAULT, DIGIT, DISTINCT, DOLLAR_SIGN, DOUBLE_QUOTED_STRING, EOF, ESC, EXPONENT, FALSE, FLOAT_LITERAL, FLT_SUFF, FUNCTION, HOUR, IDENTIFIER, INT_LITERAL, LENGTH, LETTER, LOCATE, LOWER, MAX, MIN, MINUTE, MOD, MONTH, NULL, OPERATOR, PROPERTY_PATH, SECOND, SINGLE_QUOTED_STRING, SQRT, STRING_ESC, SUBSTRING, SUM, tokenImage, TRIM, TRUE, UPPER, WEEK, WithinDoubleQuoteLiteral, WithinSingleQuoteLiteral, YEARFields inherited from interface org.apache.cayenne.exp.parser.ExpressionParserTreeConstants
JJTABS, JJTADD, JJTAND, JJTASTERISK, JJTAVG, JJTBETWEEN, JJTBITWISEAND, JJTBITWISELEFTSHIFT, JJTBITWISENOT, JJTBITWISEOR, JJTBITWISERIGHTSHIFT, JJTBITWISEXOR, JJTCONCAT, JJTCOUNT, JJTCURRENTDATE, JJTCURRENTTIME, JJTCURRENTTIMESTAMP, JJTCUSTOMFUNCTION, JJTCUSTOMOPERATOR, JJTDBIDPATH, JJTDBPATH, JJTDISTINCT, JJTDIVIDE, JJTENUM, JJTEQUAL, JJTEXTRACT, JJTFALSE, JJTGREATER, JJTGREATEROREQUAL, JJTIN, JJTLENGTH, JJTLESS, JJTLESSOREQUAL, JJTLIKE, JJTLIKEIGNORECASE, JJTLIST, JJTLOCATE, JJTLOWER, JJTMAX, JJTMIN, JJTMOD, JJTMULTIPLY, JJTNAMEDPARAMETER, JJTNEGATE, jjtNodeName, JJTNOT, JJTNOTBETWEEN, JJTNOTEQUAL, JJTNOTIN, JJTNOTLIKE, JJTNOTLIKEIGNORECASE, JJTOBJPATH, JJTOR, JJTSCALAR, JJTSQRT, JJTSUBSTRING, JJTSUBTRACT, JJTSUM, JJTTRIM, JJTTRUE, JJTUPPER, JJTVOID -
Constructor Summary
ConstructorsConstructorDescriptionExpressionParser(InputStream stream) Constructor with InputStream.ExpressionParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingExpressionParser(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidabs()final voidfinal voidfinal voidfinal voidasterisk()final voidavg()final voidfinal voidfinal voidfinal voidfinal voidconcat()final voidfinal voidcount()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidDisable tracing.final voiddistinct()final voidEnable tracing.final Expressionfinal voidfinal voidGenerate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final voidlength()final voidlocate()final voidlower()final voidmax()final voidmin()final voidmod()final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal TokenvoidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.final voidfinal voidfinal voidfinal voidfinal voidfinal voidsqrt()final voidfinal voidfinal voidfinal voidfinal voidsum()final booleanTrace enabled.final voidtrim()final voidupper()
-
Field Details
-
jjtree
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
ExpressionParser
Constructor with InputStream. -
ExpressionParser
Constructor with InputStream and supplied encoding -
ExpressionParser
Constructor. -
ExpressionParser
Constructor with generated Token Manager.
-
-
Method Details
-
expression
- Throws:
ParseException
-
orCondition
- Throws:
ParseException
-
andCondition
- Throws:
ParseException
-
notCondition
- Throws:
ParseException
-
simpleCondition
- Throws:
ParseException
-
simpleNotCondition
- Throws:
ParseException
-
scalarCommaList
- Throws:
ParseException
-
conditionExpression
- Throws:
ParseException
-
stringParameter
- Throws:
ParseException
-
stringLiteral
- Throws:
ParseException
-
stringExpression
- Throws:
ParseException
-
scalarExpression
- Throws:
ParseException
-
scalarConstExpression
- Throws:
ParseException
-
numericExpression
- Throws:
ParseException
-
bitwiseOr
- Throws:
ParseException
-
bitwiseXor
- Throws:
ParseException
-
bitwiseAnd
- Throws:
ParseException
-
bitwiseShift
- Throws:
ParseException
-
arithmeticExp
- Throws:
ParseException
-
multiplySubtractExp
- Throws:
ParseException
-
numericTermExt
- Throws:
ParseException
-
numericTerm
- Throws:
ParseException
-
numericPrimary
- Throws:
ParseException
-
functionsReturningStrings
- Throws:
ParseException
-
customFunction
- Throws:
ParseException
-
customOperator
- Throws:
ParseException
-
concat
- Throws:
ParseException
-
substring
- Throws:
ParseException
-
trim
- Throws:
ParseException
-
lower
- Throws:
ParseException
-
upper
- Throws:
ParseException
-
functionsReturningNumerics
- Throws:
ParseException
-
length
- Throws:
ParseException
-
locate
- Throws:
ParseException
-
abs
- Throws:
ParseException
-
sqrt
- Throws:
ParseException
-
mod
- Throws:
ParseException
-
aggregateExpression
- Throws:
ParseException
-
asterisk
- Throws:
ParseException
-
count
- Throws:
ParseException
-
avg
- Throws:
ParseException
-
max
- Throws:
ParseException
-
min
- Throws:
ParseException
-
sum
- Throws:
ParseException
-
dateTimeFunction
- Throws:
ParseException
-
currentDate
- Throws:
ParseException
-
currentTime
- Throws:
ParseException
-
currentTimestamp
- Throws:
ParseException
-
dateTimeExtractingFunction
- Throws:
ParseException
-
distinct
- Throws:
ParseException
-
namedParameter
- Throws:
ParseException
-
pathExpression
- Throws:
ParseException
-
pathToken
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-