Package ru.curs.celesta.dbutils.filter
Class FilterParser
- java.lang.Object
-
- ru.curs.celesta.dbutils.filter.FilterParser
-
- All Implemented Interfaces:
FilterParserConstants
public class FilterParser extends Object implements FilterParserConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FilterParser.FilterType
static interface
FilterParser.SQLTranslator
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.Token
token
Current token.FilterParserTokenManager
token_source
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
Constructors Constructor Description FilterParser(InputStream stream)
Constructor with InputStream.FilterParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encodingFilterParser(Reader stream)
Constructor.FilterParser(FilterParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
-
-
-
Field Detail
-
token_source
public FilterParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
FilterParser
public FilterParser(InputStream stream)
Constructor with InputStream.
-
FilterParser
public FilterParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
-
FilterParser
public FilterParser(Reader stream)
Constructor.
-
FilterParser
public FilterParser(FilterParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
translateFilter
public static String translateFilter(FilterParser.FilterType fieldType, String fieldName, String filter, FilterParser.SQLTranslator tr)
-
unquoteString
public static String unquoteString(String lexvalue) throws ParseException
- Throws:
ParseException
-
filterExpr
public final String filterExpr(FilterParser.FilterType filterType, String fieldName) throws ParseException
- Throws:
ParseException
-
nullExpr
public final String nullExpr() throws ParseException
- Throws:
ParseException
-
expr
public final String expr() throws ParseException
- Throws:
ParseException
-
singleExpr
public final String singleExpr() throws ParseException
- Throws:
ParseException
-
term
public final String term() throws ParseException
- Throws:
ParseException
-
numTerm
public final String numTerm() throws ParseException
- Throws:
ParseException
-
number
public final String number() throws ParseException
- Throws:
ParseException
-
dateTerm
public final String dateTerm() throws ParseException
- Throws:
ParseException
-
date
public final String date() throws ParseException
- Throws:
ParseException
-
textTerm
public final String textTerm() throws ParseException
- Throws:
ParseException
-
likeFilter
public final String likeFilter(boolean ci) throws ParseException
- Throws:
ParseException
-
text
public final String text(boolean ci) throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(InputStream stream, String encoding)
Reinitialise.
-
ReInit
public void ReInit(Reader stream)
Reinitialise.
-
ReInit
public void ReInit(FilterParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException 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.
-
-