Package ru.curs.celesta.dbutils.filter
Class FilterParser
java.lang.Object
ru.curs.celesta.dbutils.filter.FilterParser
- All Implemented Interfaces:
FilterParserConstants
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface ru.curs.celesta.dbutils.filter.FilterParserConstants
DEFAULT, DIGIT, EOF, S_CHAR_LITERAL, S_DOUBLE, S_INTEGER, S_NULL, tokenImage -
Constructor Summary
ConstructorsConstructorDescriptionFilterParser(InputStream stream) Constructor with InputStream.FilterParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingFilterParser(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringdate()final StringdateTerm()final voidDisable tracing.final voidEnable tracing.final Stringexpr()final StringfilterExpr(FilterParser.FilterType filterType, String fieldName) Generate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final StringlikeFilter(boolean ci) final StringnullExpr()final Stringnumber()final StringnumTerm()static StringquoteString(String lexvalue) voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.final Stringfinal Stringterm()final Stringtext(boolean ci) final StringtextTerm()final booleanTrace enabled.static StringtranslateFilter(FilterParser.FilterType fieldType, String fieldName, String filter, FilterParser.SQLTranslator tr) static StringunquoteString(String lexvalue)
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
FilterParser
Constructor with InputStream. -
FilterParser
Constructor with InputStream and supplied encoding -
FilterParser
Constructor. -
FilterParser
Constructor with generated Token Manager.
-
-
Method Details
-
translateFilter
public static String translateFilter(FilterParser.FilterType fieldType, String fieldName, String filter, FilterParser.SQLTranslator tr) -
quoteString
-
unquoteString
- Throws:
ParseException
-
filterExpr
public final String filterExpr(FilterParser.FilterType filterType, String fieldName) throws ParseException - Throws:
ParseException
-
nullExpr
- Throws:
ParseException
-
expr
- Throws:
ParseException
-
singleExpr
- Throws:
ParseException
-
term
- Throws:
ParseException
-
numTerm
- Throws:
ParseException
-
number
- Throws:
ParseException
-
dateTerm
- Throws:
ParseException
-
date
- Throws:
ParseException
-
textTerm
- Throws:
ParseException
-
likeFilter
- Throws:
ParseException
-
text
- 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.
-