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.Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
protected RelationalParameters |
createParameters(Method method) |
RelationalEntityMetadata<?> |
getEntityInformation() |
String |
getNamedQueryName() |
RelationalParameters |
getParameters() |
boolean |
hasAnnotatedQuery() |
boolean |
hasAnnotatedQueryName() |
boolean |
hasLockMode() |
boolean |
isModifyingQuery()
Returns whether the query method is a modifying one.
|
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)
protected RelationalParameters createParameters(Method method)
createParameters
in class org.springframework.data.repository.query.QueryMethod
public RelationalEntityMetadata<?> getEntityInformation()
getEntityInformation
in class org.springframework.data.repository.query.QueryMethod
public RelationalParameters getParameters()
getParameters
in class org.springframework.data.repository.query.QueryMethod
public boolean hasAnnotatedQueryName()
@Query(name=…)
.public String getNamedQueryName()
getNamedQueryName
in class org.springframework.data.repository.query.QueryMethod
public boolean isModifyingQuery()
isModifyingQuery
in class org.springframework.data.repository.query.QueryMethod
true
.public boolean hasAnnotatedQuery()
true
if the method has an annotated query.public boolean hasLockMode()
Lock
annotation present or not.Copyright © 2017–2023 Pivotal Software, Inc.. All rights reserved.