- java.lang.Object
-
- org.refcodes.criteria.ExpressionCriteriaFactoryImpl
-
- All Implemented Interfaces:
CriteriaFactory<String>
public class ExpressionCriteriaFactoryImpl extends Object implements CriteriaFactory<String>
Implements aCriteriaFactory
which is capable of parsing an expression such as the following one: ( ( ( City = 'Berlin' ) OR ( City = 'Munich' ) ) AND ( Surname = 'Miller' ) ).- Version:
- $Id: $Id
- Author:
- steiner
-
-
Constructor Summary
Constructors Constructor Description ExpressionCriteriaFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Criteria
fromQuery(String aQuery)
Parsed the given query and constructs aCriteria
(tree).
-
-
-
Method Detail
-
fromQuery
public Criteria fromQuery(String aQuery) throws ParseException
Parsed the given query and constructs aCriteria
(tree). Whether aCriteriaNode
or just aCriteriaLeaf
is returned depends on the complexity of the query.- Specified by:
fromQuery
in interfaceCriteriaFactory<String>
- Parameters:
aQuery
- The query to be parsed.- Returns:
- A
Criteria
(tree) representing the query as an object orientedCriteria
tree structure. - Throws:
ParseException
- Thrown in case the query could not be parsed.
-
-