java.lang.Object
org.refcodes.criteria.ExpressionCriteriaFactory
- All Implemented Interfaces:
CriteriaFactory<String>
Implements a
CriteriaFactory which is capable
of parsing an expression such as the following one: ( ( ( City = 'Berlin' )
OR ( City = 'Munich' ) ) AND ( Surname = 'Miller' ) ).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ExpressionCriteriaFactory
public ExpressionCriteriaFactory()
-
-
Method Details
-
fromQuery
Parsed the given query and constructs aCriteria(tree). Whether aCriteriaNodeor just aCriteriaLeafis returned depends on the complexity of the query.- Specified by:
fromQueryin interfaceCriteriaFactory<String>- Parameters:
aQuery- The query to be parsed.- Returns:
- A
Criteria(tree) representing the query as an object orientedCriteriatree structure. - Throws:
ParseException- Thrown in case the query could not be parsed.
-