Package org.refcodes.criteria
Class ExpressionQueryFactoryImpl
- java.lang.Object
-
- org.refcodes.criteria.ExpressionQueryFactoryImpl
-
- All Implemented Interfaces:
QueryFactory<java.lang.String>
public class ExpressionQueryFactoryImpl extends java.lang.Object implements QueryFactory<java.lang.String>
TheExpressionCriteriaFactoryImplis capable of creating queryStringinstances fromCriteriainstances; the queryStringinstances which can be used as parts of SQL statements.- Version:
- $Id: $Id
- Author:
- steiner
-
-
Constructor Summary
Constructors Constructor Description ExpressionQueryFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringfromCriteria(Criteria aCriteria)Generates a query from the providedCriteria(tree).java.lang.StringtoQuery(IntersectWithCriteria aCriteriaNode, boolean isCriteriaTreeRoot)Generates a query string for the givenCriteriaNode.java.lang.StringtoQuery(LessThanCriteria<?> aCriteriaLeaf, boolean isCriteriaTreeRoot)Generates a query string for the givenCriteriaLeaf.
-
-
-
Method Detail
-
fromCriteria
public java.lang.String fromCriteria(Criteria aCriteria)
Generates a query from the providedCriteria(tree).- Specified by:
fromCriteriain interfaceQueryFactory<java.lang.String>- Parameters:
aCriteria- TheCriteriafrom which to generate the query.- Returns:
- A query generated from the provided
Criteria(tree).
-
toQuery
public java.lang.String toQuery(IntersectWithCriteria aCriteriaNode, boolean isCriteriaTreeRoot)
Generates a query string for the givenCriteriaNode.- Parameters:
aCriteriaNode- TheCriteriaNodefor which to generate the query.isCriteriaTreeRoot- True in case theCriteriaNodeis the root of theCriteriatree. Being root means dedicated handling of theCriteriaNodethen not being root.- Returns:
- The query generated from the given
CriteriaNode.
-
toQuery
public java.lang.String toQuery(LessThanCriteria<?> aCriteriaLeaf, boolean isCriteriaTreeRoot)
Generates a query string for the givenCriteriaLeaf.- Parameters:
aCriteriaLeaf- TheCriteriaLeaffor which to generate the query.isCriteriaTreeRoot- True in case theCriteriaLeafis the root of theCriteriatree. Being root means dedicated handling of theCriteriaLeafthen not being root.- Returns:
- The query generated from the given
CriteriaLeaf.
-
-