Class ExpressionCriteriaFactoryImpl

  • All Implemented Interfaces:
    CriteriaFactory<java.lang.String>

    public class ExpressionCriteriaFactoryImpl
    extends java.lang.Object
    implements CriteriaFactory<java.lang.String>
    Implements a CriteriaFactory 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 Detail

      • ExpressionCriteriaFactoryImpl

        public ExpressionCriteriaFactoryImpl()
    • Method Detail

      • fromQuery

        public Criteria fromQuery​(java.lang.String aQuery)
                           throws java.text.ParseException
        Parsed the given query and constructs a Criteria (tree). Whether a CriteriaNode or just a CriteriaLeaf is returned depends on the complexity of the query.
        Specified by:
        fromQuery in interface CriteriaFactory<java.lang.String>
        Parameters:
        aQuery - The query to be parsed.
        Returns:
        A Criteria (tree) representing the query as an object oriented Criteria tree structure.
        Throws:
        java.text.ParseException - Thrown in case the query could not be parsed.