Constructor and Description |
---|
AbstractQueryCreator(PartTree tree)
Creates a new
AbstractQueryCreator for the given PartTree . |
AbstractQueryCreator(PartTree tree,
ParameterAccessor parameters)
|
Modifier and Type | Method and Description |
---|---|
protected abstract S |
and(Part part,
S base,
Iterator<Object> iterator)
Creates a new criteria object from the given part and and-concatenates it to the given base criteria.
|
protected abstract T |
complete(S criteria,
Sort sort)
Actually creates the query object applying the given criteria object and
Sort definition. |
protected abstract S |
create(Part part,
Iterator<Object> iterator)
Creates a new atomic instance of the criteria object.
|
T |
createQuery()
Creates the actual query object.
|
T |
createQuery(Sort dynamicSort)
Creates the actual query object applying the given
Sort parameter. |
protected abstract S |
or(S base,
S criteria)
Or-concatenates the given base criteria to the given new criteria.
|
public AbstractQueryCreator(PartTree tree, ParameterAccessor parameters)
AbstractQueryCreator
for the given PartTree
and ParametersParameterAccessor
.
The latter is used to hand actual parameter values into the callback methods as well as to apply dynamic sorting
via a Sort
parameter.tree
- must not be null.parameters
- can be null.public AbstractQueryCreator(PartTree tree)
AbstractQueryCreator
for the given PartTree
. This will cause null be
handed for the Iterator
in the callback methods.tree
- must not be null.public T createQuery()
public T createQuery(Sort dynamicSort)
Sort
parameter. Use this method in case you haven't
provided a ParameterAccessor
in the first place but want to apply dynamic sorting nevertheless.dynamicSort
- protected abstract S create(Part part, Iterator<Object> iterator)
part
- iterator
- protected abstract S and(Part part, S base, Iterator<Object> iterator)
part
- base
- will never be null.iterator
- protected abstract S or(S base, S criteria)
base
- criteria
- Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.