Class RelationalQueryCreator<T>
java.lang.Object
org.springframework.data.repository.query.parser.AbstractQueryCreator<T,Criteria>
org.springframework.data.relational.repository.query.RelationalQueryCreator<T>
Implementation of
AbstractQueryCreator
that creates a query from a PartTree
.- Since:
- 2.0
- Author:
- Roman Chigvintsev, Mark Paluch
-
Constructor Summary
ConstructorDescriptionRelationalQueryCreator
(PartTree tree, RelationalParameterAccessor accessor) Creates new instance of this class with the givenPartTree
,RelationalEntityMetadata
andParameterMetadataProvider
. -
Method Summary
Modifier and TypeMethodDescriptionprotected Criteria
Combines the givenCriteria
with the new one created for the given method name part usingAND
.protected Criteria
CreatesCriteria
for the given method name part.protected Criteria
Combines twoCriteria
s usingOR
.static void
validate
(PartTree tree, Parameters<?, ?> parameters) Validate parameters for the derived query.Methods inherited from class org.springframework.data.repository.query.parser.AbstractQueryCreator
complete, createQuery, createQuery
-
Constructor Details
-
RelationalQueryCreator
Creates new instance of this class with the givenPartTree
,RelationalEntityMetadata
andParameterMetadataProvider
.- Parameters:
tree
- part tree, must not be null.accessor
- parameter metadata provider, must not be null.
-
-
Method Details
-
create
CreatesCriteria
for the given method name part.- Specified by:
create
in classAbstractQueryCreator<T,
Criteria> - Parameters:
part
- method name part, must not be null.iterator
- iterator over query parameter values- Returns:
- new instance of
Criteria
-
and
Combines the givenCriteria
with the new one created for the given method name part usingAND
. -
or
Combines twoCriteria
s usingOR
. -
validate
Validate parameters for the derived query. Specifically checking that the query method defines scalar parameters and collection parameters where required and that invalid parameter declarations are rejected.- Parameters:
tree
-parameters
-
-