@@ -28,10 +28,11 @@ import org.springframework.data.relational.core.mapping.RelationalPersistentEnti
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
||||
import org.springframework.data.relational.repository.Lock;
|
||||
import org.springframework.data.relational.repository.query.RelationalEntityMetadata;
|
||||
import org.springframework.data.relational.repository.query.RelationalParameters;
|
||||
import org.springframework.data.relational.repository.query.SimpleRelationalEntityMetadata;
|
||||
import org.springframework.data.repository.core.NamedQueries;
|
||||
import org.springframework.data.repository.core.RepositoryMetadata;
|
||||
import org.springframework.data.repository.query.Parameters;
|
||||
import org.springframework.data.repository.query.ParametersSource;
|
||||
import org.springframework.data.repository.query.QueryMethod;
|
||||
import org.springframework.jdbc.core.ResultSetExtractor;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
@@ -67,6 +68,7 @@ public class JdbcQueryMethod extends QueryMethod {
|
||||
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> mappingContext) {
|
||||
|
||||
super(method, metadata, factory);
|
||||
|
||||
this.namedQueries = namedQueries;
|
||||
this.method = method;
|
||||
this.mappingContext = mappingContext;
|
||||
@@ -75,8 +77,8 @@ public class JdbcQueryMethod extends QueryMethod {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RelationalParameters createParameters(Method method) {
|
||||
return new JdbcParameters(method);
|
||||
protected Parameters<?, ?> createParameters(ParametersSource parametersSource) {
|
||||
return new JdbcParameters(parametersSource);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.core.ResolvableType;
|
||||
import org.springframework.data.relational.repository.query.RelationalParameters.RelationalParameter;
|
||||
import org.springframework.data.repository.query.Parameter;
|
||||
import org.springframework.data.repository.query.Parameters;
|
||||
import org.springframework.data.repository.query.ParametersSource;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,7 @@ public class RelationalParameters extends Parameters<RelationalParameters, Relat
|
||||
}
|
||||
|
||||
protected RelationalParameters(ParametersSource parametersSource,
|
||||
Function<MethodParameter, RelationalParameter> parameterFactory) {
|
||||
Function<MethodParameter, RelationalParameter> parameterFactory) {
|
||||
super(parametersSource, parameterFactory);
|
||||
}
|
||||
|
||||
@@ -81,6 +82,18 @@ public class RelationalParameters extends Parameters<RelationalParameters, Relat
|
||||
this.typeInformation = TypeInformation.fromMethodParameter(parameter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link RelationalParameter}.
|
||||
*
|
||||
* @param parameter must not be {@literal null}.
|
||||
*/
|
||||
protected RelationalParameter(MethodParameter parameter, TypeInformation<?> domainType) {
|
||||
|
||||
super(parameter, domainType);
|
||||
|
||||
this.typeInformation = TypeInformation.fromMethodParameter(parameter);
|
||||
}
|
||||
|
||||
public ResolvableType getResolvableType() {
|
||||
return getTypeInformation().toTypeDescriptor().getResolvableType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user