|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.byteslooser.filters.parser.generic.FilterTextParser
public class FilterTextParser
Specific implementation of the IFilterTextParser
interface.
Own features of this implementation includes:
IRelationalOperandFactory interface.IRelationalOperandFactory interface.IRelationalOperandFactory
that can identify any portion of string as an operand.
| Field Summary | |
|---|---|
static char |
AND_CHAR
|
static char |
CLOSE_PARENTHESIS_CHAR
|
static String |
DEFAULT_NULL_STRING
|
static char |
ESCAPE_CHAR
|
static char |
OPEN_PARENTHESIS_CHAR
|
static char |
OR_CHAR
|
static char |
SPACE_CHAR
|
| Fields inherited from interface com.byteslooser.filters.parser.IFilterTextParser |
|---|
NO_FILTER_POSITION |
| Constructor Summary | |
|---|---|
FilterTextParser()
Simple contructor |
|
FilterTextParser(IRelationalOperandFactory operandFactory)
Constructor defining a different set of relational operands |
|
FilterTextParser(IRelationalOperandFactory operandFactory,
ITypesFactory typesFactory)
Constructor defining a different set of relational operands and a type factory. |
|
FilterTextParser(ITypesFactory typesFactory)
Constructor defining a specific type factory. |
|
| Method Summary | |
|---|---|
RowFilter |
parseText(String exp,
int defaultFilterPosition)
Parses the text, using the given default identifier. |
void |
setComparator(Class<?> c,
Comparator<?> cmp)
Sets a specific comparator for a given class, that should override the default Compare algorithm for the given class. |
void |
setIdentifiers(List<IdentifierInfo> validIdentifiers)
Defines the identifiers, and the types and indexes associated to them |
void |
setIgnoreCase(boolean ignore)
Ignores case on the conditions associated to variables with String type |
void |
setNullString(String nullString)
Sets the representation of the null case, null by default. |
void |
setTypeBuilder(Class<?> c,
ITypeBuilder parser)
Provides the ITypeBuilder to build non basic types |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char SPACE_CHAR
public static final char ESCAPE_CHAR
public static final char AND_CHAR
public static final char OR_CHAR
public static final char OPEN_PARENTHESIS_CHAR
public static final char CLOSE_PARENTHESIS_CHAR
public static final String DEFAULT_NULL_STRING
| Constructor Detail |
|---|
public FilterTextParser()
public FilterTextParser(IRelationalOperandFactory operandFactory)
Constructor defining a different set of relational operands
Note that the main operands: ( ) & | are hardcoded in this class, cannot be modified in the passed factory
public FilterTextParser(ITypesFactory typesFactory)
public FilterTextParser(IRelationalOperandFactory operandFactory, ITypesFactory typesFactory)
Constructor defining a different set of relational operands and a type factory.
Note that the main operands: ( ) & | are hardcoded in this class, cannot be modified in the passed factory
| Method Detail |
|---|
public void setIgnoreCase(boolean ignore)
IFilterTextParser
setIgnoreCase in interface IFilterTextParserpublic void setIdentifiers(List<IdentifierInfo> validIdentifiers)
IFilterTextParser
setIdentifiers in interface IFilterTextParserpublic void setComparator(Class<?> c, Comparator<?> cmp)
Sets a specific comparator for a given class, that should override the default Compare algorithm for the given class.
If the class is not Comparable, this method should be invoked to support
any comparison operator.
public void setTypeBuilder(Class<?> c, ITypeBuilder parser)
ITypeBuilder to build non basic types
public RowFilter parseText(String exp, int defaultFilterPosition) throws FilterTextParsingException
IFilterTextParserParses the text, using the given default identifier.
If the parsed expression includes conditions that specify no identifier, the default identifier is used.
Default identifier can be IFilterTextParser.NO_FILTER_POSITION, if the expression
must provide them specifically
A filter supporting the interface RowFilter receives an instance of
type RowFilter.Entry that can enquiry to obtain the value at a specified
index; the filter position is that given index, and corresponds, in the case of a table, to
the column to which this editor is associated.
parseText in interface IFilterTextParserFilterTextParsingExceptionIFilterTextParser.parseText(String, int)public void setNullString(String nullString)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||