|
17 | 17 |
|
18 | 18 | import reactor.core.publisher.Mono;
|
19 | 19 |
|
20 |
| -import org.springframework.core.env.StandardEnvironment; |
21 | 20 | import org.springframework.data.cassandra.core.ReactiveCassandraOperations;
|
22 | 21 | import org.springframework.data.cassandra.repository.Query;
|
23 | 22 | import org.springframework.data.expression.ReactiveValueEvaluationContextProvider;
|
24 | 23 | import org.springframework.data.expression.ValueEvaluationContextProvider;
|
25 |
| -import org.springframework.data.expression.ValueExpressionParser; |
26 | 24 | import org.springframework.data.mapping.model.ValueExpressionEvaluator;
|
27 |
| -import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider; |
28 |
| -import org.springframework.data.repository.query.QueryMethodValueEvaluationContextAccessor; |
29 |
| -import org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider; |
30 | 25 | import org.springframework.data.repository.query.ValueExpressionDelegate;
|
31 | 26 | import org.springframework.data.spel.ExpressionDependencies;
|
32 |
| -import org.springframework.expression.ExpressionParser; |
33 | 27 | import org.springframework.expression.spel.standard.SpelExpressionParser;
|
34 | 28 | import org.springframework.util.Assert;
|
35 | 29 |
|
@@ -62,50 +56,6 @@ public class ReactiveStringBasedCassandraQuery extends AbstractReactiveCassandra
|
62 | 56 |
|
63 | 57 | private final ReactiveValueEvaluationContextProvider valueEvaluationContextProvider;
|
64 | 58 |
|
65 |
| - /** |
66 |
| - * Create a new {@link ReactiveStringBasedCassandraQuery} for the given {@link CassandraQueryMethod}, |
67 |
| - * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser}, and |
68 |
| - * {@link QueryMethodEvaluationContextProvider}. |
69 |
| - * |
70 |
| - * @param queryMethod {@link ReactiveCassandraQueryMethod} on which this query is based. |
71 |
| - * @param operations {@link ReactiveCassandraOperations} used to perform data access in Cassandra. |
72 |
| - * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query. |
73 |
| - * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared |
74 |
| - * {@link org.springframework.expression.spel.support.StandardEvaluationContext}. |
75 |
| - * @see org.springframework.data.cassandra.repository.query.ReactiveCassandraQueryMethod |
76 |
| - * @see org.springframework.data.cassandra.core.ReactiveCassandraOperations |
77 |
| - * @deprecated since 4.4, use the constructors accepting {@link ValueExpressionDelegate} instead. |
78 |
| - */ |
79 |
| - @Deprecated(since = "4.4") |
80 |
| - public ReactiveStringBasedCassandraQuery(ReactiveCassandraQueryMethod queryMethod, |
81 |
| - ReactiveCassandraOperations operations, ExpressionParser expressionParser, |
82 |
| - ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) { |
83 |
| - |
84 |
| - this(queryMethod.getRequiredAnnotatedQuery(), queryMethod, operations, expressionParser, evaluationContextProvider); |
85 |
| - } |
86 |
| - |
87 |
| - /** |
88 |
| - * Create a new {@link ReactiveStringBasedCassandraQuery} for the given {@code query}, {@link CassandraQueryMethod}, |
89 |
| - * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser}, and |
90 |
| - * {@link QueryMethodEvaluationContextProvider}. |
91 |
| - * |
92 |
| - * @param method {@link ReactiveCassandraQueryMethod} on which this query is based. |
93 |
| - * @param operations {@link ReactiveCassandraOperations} used to perform data access in Cassandra. |
94 |
| - * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query. |
95 |
| - * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared |
96 |
| - * {@link org.springframework.expression.spel.support.StandardEvaluationContext}. |
97 |
| - * @see org.springframework.data.cassandra.repository.query.ReactiveCassandraQueryMethod |
98 |
| - * @see org.springframework.data.cassandra.core.ReactiveCassandraOperations |
99 |
| - * @deprecated since 4.4, use the constructors accepting {@link ValueExpressionDelegate} instead. |
100 |
| - */ |
101 |
| - @Deprecated(since = "4.4") |
102 |
| - public ReactiveStringBasedCassandraQuery(String query, ReactiveCassandraQueryMethod method, |
103 |
| - ReactiveCassandraOperations operations, ExpressionParser expressionParser, |
104 |
| - ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider) { |
105 |
| - |
106 |
| - this(query, method, operations, new ValueExpressionDelegate(new QueryMethodValueEvaluationContextAccessor(new StandardEnvironment(), evaluationContextProvider.getEvaluationContextProvider()), ValueExpressionParser.create(() -> expressionParser))); |
107 |
| - } |
108 |
| - |
109 | 59 | /**
|
110 | 60 | * Create a new {@link ReactiveStringBasedCassandraQuery} for the given {@link CassandraQueryMethod},
|
111 | 61 | * {@link ReactiveCassandraOperations}, {@link ValueExpressionDelegate}
|
@@ -145,9 +95,9 @@ public ReactiveStringBasedCassandraQuery(String query, ReactiveCassandraQueryMet
|
145 | 95 |
|
146 | 96 | this.stringBasedQuery = new StringBasedQuery(query, method.getParameters(), delegate);
|
147 | 97 |
|
148 |
| - ValueEvaluationContextProvider valueContextProvider = delegate.createValueContextProvider( |
149 |
| - method.getParameters()); |
150 |
| - Assert.isInstanceOf(ReactiveValueEvaluationContextProvider.class, valueContextProvider, "ValueEvaluationContextProvider must be reactive"); |
| 98 | + ValueEvaluationContextProvider valueContextProvider = delegate.createValueContextProvider(method.getParameters()); |
| 99 | + Assert.isInstanceOf(ReactiveValueEvaluationContextProvider.class, valueContextProvider, |
| 100 | + "ValueEvaluationContextProvider must be reactive"); |
151 | 101 | this.valueEvaluationContextProvider = (ReactiveValueEvaluationContextProvider) valueContextProvider;
|
152 | 102 |
|
153 | 103 | if (method.hasAnnotatedQuery()) {
|
|
0 commit comments