Module spring.data.jdbc
Class JdbcQueryMethod
java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.jdbc.repository.query.JdbcQueryMethod
QueryMethod implementation that implements a method by executing the query from a Query annotation on
that method. Binds method arguments to named parameters in the SQL statement.- Author:
- Jens Schauder, Kazuki Shimizu, Moises Cisneros, Hebert Coelho, Diego Krupitza, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory, NamedQueries namedQueries, MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, ? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected Parameters<?,?> createParameters(ParametersSource parametersSource) org.springframework.data.relational.repository.query.RelationalEntityMetadata<?>booleanbooleanbooleanbooleanReturns whether the query method is a modifying one.Methods inherited from class org.springframework.data.repository.query.QueryMethod
createParameters, getDomainClass, getName, getResultProcessor, getReturnedObjectType, isCollectionQuery, isPageQuery, isQueryForEntity, isScrollQuery, isSliceQuery, isStreamQuery, toString
-
Constructor Details
-
JdbcQueryMethod
public JdbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory, NamedQueries namedQueries, MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, ? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> mappingContext)
-
-
Method Details
-
createParameters
- Overrides:
createParametersin classQueryMethod
-
getEntityInformation
public org.springframework.data.relational.repository.query.RelationalEntityMetadata<?> getEntityInformation()- Overrides:
getEntityInformationin classQueryMethod
-
getParameters
- Overrides:
getParametersin classQueryMethod
-
getRequiredQuery
-
hasAnnotatedQueryName
public boolean hasAnnotatedQueryName()- Returns:
- true if the method is annotated with
@Query(name=…).
-
getNamedQueryName
- Overrides:
getNamedQueryNamein classQueryMethod
-
isModifyingQuery
public boolean isModifyingQuery()Returns whether the query method is a modifying one.- Overrides:
isModifyingQueryin classQueryMethod- Returns:
- if it's a modifying query, return
true.
-
hasAnnotatedQuery
public boolean hasAnnotatedQuery()- Returns:
trueif the method has an annotated query.
-
hasLockMode
public boolean hasLockMode()- Returns:
- is a
Lockannotation present or not.
-