3535import org .springframework .core .MethodParameter ;
3636import org .springframework .data .repository .query .Parameter ;
3737import org .springframework .data .repository .query .Parameters ;
38+ import org .springframework .data .repository .query .ParametersSource ;
39+ import org .springframework .data .util .TypeInformation ;
3840import org .springframework .util .Assert ;
3941
4042import com .arangodb .model .AqlQueryOptions ;
@@ -52,13 +54,13 @@ public class ArangoParameters extends Parameters<ArangoParameters, ArangoParamet
5254 private final int queryOptionsIndex ;
5355 private final int bindVarsIndex ;
5456
55- public ArangoParameters (final Method method ) {
56- super (method );
57+ public ArangoParameters (final ParametersSource parametersSource ) {
58+ super (parametersSource , ArangoParameter :: new );
5759 assertSingleSpecialParameter (ArangoParameter ::isQueryOptions ,
58- "Multiple AqlQueryOptions parameters are not allowed! Offending method: " + method );
60+ "Multiple AqlQueryOptions parameters are not allowed! Offending method: " + parametersSource . getMethod () );
5961 assertSingleSpecialParameter (ArangoParameter ::isBindVars ,
60- "Multiple @BindVars parameters are not allowed! Offending method: " + method );
61- assertNonDuplicateParamNames (method );
62+ "Multiple @BindVars parameters are not allowed! Offending method: " + parametersSource . getMethod () );
63+ assertNonDuplicateParamNames (parametersSource . getMethod () );
6264 this .queryOptionsIndex = getIndexOfSpecialParameter (ArangoParameter ::isQueryOptions );
6365 this .bindVarsIndex = getIndexOfSpecialParameter (ArangoParameter ::isBindVars );
6466 }
@@ -70,11 +72,6 @@ private ArangoParameters(final List<ArangoParameter> parameters, final int query
7072 this .bindVarsIndex = bindVarsIndex ;
7173 }
7274
73- @ Override
74- protected ArangoParameter createParameter (final MethodParameter parameter ) {
75- return new ArangoParameter (parameter );
76- }
77-
7875 @ Override
7976 protected ArangoParameters createFrom (final List <ArangoParameter > parameters ) {
8077 return new ArangoParameters (parameters , this .queryOptionsIndex , this .bindVarsIndex );
@@ -141,7 +138,7 @@ static class ArangoParameter extends Parameter {
141138 private final MethodParameter parameter ;
142139
143140 public ArangoParameter (final MethodParameter parameter ) {
144- super (parameter );
141+ super (parameter , TypeInformation . of ( ArangoParameter . class ) );
145142 this .parameter = parameter ;
146143 assertCorrectBindParamPattern ();
147144 assertCorrectBindVarsType ();
0 commit comments