Package com.saperion.ngc.resultset
Class SearchStringParser
java.lang.Object
com.saperion.ngc.resultset.SearchStringParser
Parses search strings entered by the user.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchStringParser(String searchString, Map<String, ResultSetColumn> availableColumns) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the search string is just a simple string and does not define one or more column/value pairs.parse()Parses the string.
-
Constructor Details
-
SearchStringParser
Constructor.- Parameters:
searchString- string to parseavailableColumns- map with all available columns and their labels
-
-
Method Details
-
isSimpleString
public boolean isSimpleString()Checks if the search string is just a simple string and does not define one or more column/value pairs.- Returns:
- true if no column/value pairs exist
-
getSimpleString
- Returns:
- the search string without escape characters.
- Throws:
SearchSyntaxException- when the string is too short
-
parse
Parses the string.- Returns:
- Map containing column, filter pairs.
- Throws:
SearchSyntaxException- on syntax error
-