Module spring.data.r2dbc
Class R2dbcQueryMethod
java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.r2dbc.repository.query.R2dbcQueryMethod
Reactive specific implementation of
QueryMethod.- Author:
- Mark Paluch, Stephen Cohen, Diego Krupitza
-
Constructor Summary
ConstructorsConstructorDescriptionR2dbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory projectionFactory, MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, ? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> mappingContext) Creates a newR2dbcQueryMethodfrom the givenMethod. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.data.relational.repository.query.RelationalParameterscreateParameters(Method method) org.springframework.data.relational.repository.query.RelationalEntityMetadata<?>org.springframework.data.relational.repository.query.RelationalParametersReturns the required query string declared in aQueryannotation or throwsIllegalStateExceptionif neither the annotation found nor the attribute was specified.booleanbooleanbooleanCheck if the givenQueryMethodreceives a reactive parameter wrapper as one of its parameters.booleanbooleanbooleanMethods inherited from class org.springframework.data.repository.query.QueryMethod
createParameters, createParameters, getDomainClass, getName, getNamedQueryName, getResultProcessor, getReturnedObjectType, isPageQuery, isQueryForEntity, isScrollQuery, isSliceQuery, toString
-
Constructor Details
-
R2dbcQueryMethod
public R2dbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory projectionFactory, MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, ? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> mappingContext) Creates a newR2dbcQueryMethodfrom the givenMethod.- Parameters:
method- must not be null.metadata- must not be null.projectionFactory- must not be null.mappingContext- must not be null.
-
-
Method Details
-
createParameters
protected org.springframework.data.relational.repository.query.RelationalParameters createParameters(Method method) - Overrides:
createParametersin classQueryMethod
-
isCollectionQuery
public boolean isCollectionQuery()- Overrides:
isCollectionQueryin classQueryMethod
-
isModifyingQuery
public boolean isModifyingQuery()- Overrides:
isModifyingQueryin classQueryMethod
-
hasLockMode
public boolean hasLockMode()- Returns:
- is a
Lockannotation present or not.
-
isStreamQuery
public boolean isStreamQuery()- Overrides:
isStreamQueryin classQueryMethod
-
getEntityInformation
public org.springframework.data.relational.repository.query.RelationalEntityMetadata<?> getEntityInformation()- Overrides:
getEntityInformationin classQueryMethod
-
getParameters
public org.springframework.data.relational.repository.query.RelationalParameters getParameters()- Overrides:
getParametersin classQueryMethod
-
hasReactiveWrapperParameter
public boolean hasReactiveWrapperParameter()Check if the givenQueryMethodreceives a reactive parameter wrapper as one of its parameters.- Returns:
- true if the given
QueryMethodreceives a reactive parameter wrapper as one of its parameters.
-
getRequiredAnnotatedQuery
Returns the required query string declared in aQueryannotation or throwsIllegalStateExceptionif neither the annotation found nor the attribute was specified.- Returns:
- the query string.
- Throws:
IllegalStateException- in case query method has no annotated query.
-
hasAnnotatedQuery
public boolean hasAnnotatedQuery()
-