Package org.refcodes.criteria
Class ExpressionCriteriaFactoryImpl
- java.lang.Object
-
- org.refcodes.criteria.ExpressionCriteriaFactoryImpl
-
- All Implemented Interfaces:
CriteriaFactory<java.lang.String>
public class ExpressionCriteriaFactoryImpl extends java.lang.Object implements CriteriaFactory<java.lang.String>
Implements aCriteriaFactorywhich 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 CriteriafromQuery(java.lang.String aQuery)Parsed the given query and constructs aCriteria(tree).
-
-
-
Method Detail
-
fromQuery
public Criteria fromQuery(java.lang.String aQuery) throws java.text.ParseException
Parsed the given query and constructs aCriteria(tree). Whether aCriteriaNodeor just aCriteriaLeafis returned depends on the complexity of the query.- Specified by:
fromQueryin interfaceCriteriaFactory<java.lang.String>- Parameters:
aQuery- The query to be parsed.- Returns:
- A
Criteria(tree) representing the query as an object orientedCriteriatree structure. - Throws:
java.text.ParseException- Thrown in case the query could not be parsed.
-
-