Class JdbcQueryMethod
java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.jdbc.repository.query.JdbcQueryMethod
public class JdbcQueryMethod
extends org.springframework.data.repository.query.QueryMethod
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
-
Constructor Summary
ConstructorDescriptionJdbcQueryMethod
(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory, org.springframework.data.repository.core.NamedQueries namedQueries, org.springframework.data.mapping.context.MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected RelationalParameters
createParameters
(Method method) boolean
boolean
boolean
boolean
Returns 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, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory factory, org.springframework.data.repository.core.NamedQueries namedQueries, org.springframework.data.mapping.context.MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> mappingContext)
-
-
Method Details
-
createParameters
- Overrides:
createParameters
in classorg.springframework.data.repository.query.QueryMethod
-
getEntityInformation
- Overrides:
getEntityInformation
in classorg.springframework.data.repository.query.QueryMethod
-
getParameters
- Overrides:
getParameters
in classorg.springframework.data.repository.query.QueryMethod
-
hasAnnotatedQueryName
public boolean hasAnnotatedQueryName()- Returns:
- true if the method is annotated with
@Query(name=…)
.
-
getNamedQueryName
- Overrides:
getNamedQueryName
in classorg.springframework.data.repository.query.QueryMethod
-
isModifyingQuery
public boolean isModifyingQuery()Returns whether the query method is a modifying one.- Overrides:
isModifyingQuery
in classorg.springframework.data.repository.query.QueryMethod
- Returns:
- if it's a modifying query, return
true
.
-
hasAnnotatedQuery
public boolean hasAnnotatedQuery()- Returns:
true
if the method has an annotated query.
-
hasLockMode
public boolean hasLockMode()- Returns:
- is a
Lock
annotation present or not.
-