java.lang.Object
org.refcodes.criteria.ExpressionQueryFactoryImpl
- All Implemented Interfaces:
QueryFactory<String>
public class ExpressionQueryFactoryImpl extends Object implements QueryFactory<String>
The
ExpressionCriteriaFactoryImpl
is capable of
creating query String
instances from
Criteria
instances; the query
String
instances which can be used as parts of SQL
statements.- Version:
- $Id: $Id
- Author:
- steiner
-
Constructor Summary
Constructors Constructor Description ExpressionQueryFactoryImpl()
-
Method Summary
Modifier and Type Method Description String
fromCriteria(Criteria aCriteria)
Generates a query from the providedCriteria
(tree).String
toQuery(IntersectWithCriteria aCriteriaNode, boolean isCriteriaTreeRoot)
Generates a query string for the givenCriteriaNode
.String
toQuery(LessThanCriteria<?> aCriteriaLeaf, boolean isCriteriaTreeRoot)
Generates a query string for the givenCriteriaLeaf
.
-
Constructor Details
-
ExpressionQueryFactoryImpl
public ExpressionQueryFactoryImpl()
-
-
Method Details
-
fromCriteria
Generates a query from the providedCriteria
(tree).- Specified by:
fromCriteria
in interfaceQueryFactory<String>
- Parameters:
aCriteria
- TheCriteria
from which to generate the query.- Returns:
- A query generated from the provided
Criteria
(tree).
-
toQuery
Generates a query string for the givenCriteriaNode
.- Parameters:
aCriteriaNode
- TheCriteriaNode
for which to generate the query.isCriteriaTreeRoot
- True in case theCriteriaNode
is the root of theCriteria
tree. Being root means dedicated handling of theCriteriaNode
then not being root.- Returns:
- The query generated from the given
CriteriaNode
.
-
toQuery
Generates a query string for the givenCriteriaLeaf
.- Parameters:
aCriteriaLeaf
- TheCriteriaLeaf
for which to generate the query.isCriteriaTreeRoot
- True in case theCriteriaLeaf
is the root of theCriteria
tree. Being root means dedicated handling of theCriteriaLeaf
then not being root.- Returns:
- The query generated from the given
CriteriaLeaf
.
-