30
30
import org .springframework .beans .BeanInstantiationException ;
31
31
import org .springframework .beans .BeanUtils ;
32
32
import org .springframework .beans .factory .BeanFactory ;
33
- import org .springframework .core .env .StandardEnvironment ;
34
33
import org .springframework .data .expression .ValueEvaluationContext ;
35
- import org .springframework .data .expression .ValueExpressionParser ;
36
34
import org .springframework .data .jdbc .core .convert .JdbcColumnTypes ;
37
35
import org .springframework .data .jdbc .core .convert .JdbcConverter ;
38
36
import org .springframework .data .jdbc .core .mapping .JdbcValue ;
39
37
import org .springframework .data .jdbc .support .JdbcUtil ;
40
38
import org .springframework .data .relational .core .mapping .RelationalMappingContext ;
41
39
import org .springframework .data .relational .repository .query .RelationalParameterAccessor ;
42
40
import org .springframework .data .relational .repository .query .RelationalParametersParameterAccessor ;
43
- import org .springframework .data .repository .query .CachingValueExpressionDelegate ;
44
41
import org .springframework .data .repository .query .Parameter ;
45
42
import org .springframework .data .repository .query .Parameters ;
46
- import org .springframework .data .repository .query .QueryMethodEvaluationContextProvider ;
47
- import org .springframework .data .repository .query .QueryMethodValueEvaluationContextAccessor ;
48
43
import org .springframework .data .repository .query .ResultProcessor ;
49
44
import org .springframework .data .repository .query .ValueExpressionDelegate ;
50
45
import org .springframework .data .repository .query .ValueExpressionQueryRewriter ;
@@ -87,43 +82,6 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
87
82
private final CachedResultSetExtractorFactory cachedResultSetExtractorFactory ;
88
83
private final ValueExpressionDelegate delegate ;
89
84
90
- /**
91
- * Creates a new {@link StringBasedJdbcQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
92
- * and {@link RowMapper}.
93
- *
94
- * @param queryMethod must not be {@literal null}.
95
- * @param operations must not be {@literal null}.
96
- * @param defaultRowMapper can be {@literal null} (only in case of a modifying query).
97
- * @deprecated since 3.4, use the constructors accepting {@link ValueExpressionDelegate} instead.
98
- */
99
- @ Deprecated (since = "3.4" )
100
- public StringBasedJdbcQuery (JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
101
- @ Nullable RowMapper <?> defaultRowMapper , JdbcConverter converter ,
102
- QueryMethodEvaluationContextProvider evaluationContextProvider ) {
103
- this (queryMethod .getRequiredQuery (), queryMethod , operations , result -> (RowMapper <Object >) defaultRowMapper ,
104
- converter , evaluationContextProvider );
105
- }
106
-
107
- /**
108
- * Creates a new {@link StringBasedJdbcQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
109
- * and {@link RowMapperFactory}.
110
- *
111
- * @param queryMethod must not be {@literal null}.
112
- * @param operations must not be {@literal null}.
113
- * @param rowMapperFactory must not be {@literal null}.
114
- * @param converter must not be {@literal null}.
115
- * @param evaluationContextProvider must not be {@literal null}.
116
- * @since 2.3
117
- * @deprecated use alternative constructor
118
- */
119
- @ Deprecated (since = "3.4" )
120
- public StringBasedJdbcQuery (JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
121
- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
122
- QueryMethodEvaluationContextProvider evaluationContextProvider ) {
123
- this (queryMethod .getRequiredQuery (), queryMethod , operations , rowMapperFactory , converter ,
124
- evaluationContextProvider );
125
- }
126
-
127
85
/**
128
86
* Creates a new {@link StringBasedJdbcQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
129
87
* and {@link RowMapperFactory}.
@@ -136,8 +94,7 @@ public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, NamedParameterJdbcOpera
136
94
* @since 3.4
137
95
*/
138
96
public StringBasedJdbcQuery (JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
139
- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
140
- ValueExpressionDelegate delegate ) {
97
+ RowMapperFactory rowMapperFactory , JdbcConverter converter , ValueExpressionDelegate delegate ) {
141
98
this (queryMethod .getRequiredQuery (), queryMethod , operations , rowMapperFactory , converter , delegate );
142
99
}
143
100
@@ -154,8 +111,7 @@ public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, NamedParameterJdbcOpera
154
111
* @since 3.4
155
112
*/
156
113
public StringBasedJdbcQuery (String query , JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
157
- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
158
- ValueExpressionDelegate delegate ) {
114
+ RowMapperFactory rowMapperFactory , JdbcConverter converter , ValueExpressionDelegate delegate ) {
159
115
super (queryMethod , operations );
160
116
Assert .hasText (query , "Query must not be null or empty" );
161
117
Assert .notNull (rowMapperFactory , "RowMapperFactory must not be null" );
@@ -191,29 +147,6 @@ public StringBasedJdbcQuery(String query, JdbcQueryMethod queryMethod, NamedPara
191
147
this .delegate = delegate ;
192
148
}
193
149
194
- /**
195
- * Creates a new {@link StringBasedJdbcQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
196
- * and {@link RowMapperFactory}.
197
- *
198
- * @param query must not be {@literal null} or empty.
199
- * @param queryMethod must not be {@literal null}.
200
- * @param operations must not be {@literal null}.
201
- * @param rowMapperFactory must not be {@literal null}.
202
- * @param converter must not be {@literal null}.
203
- * @param evaluationContextProvider must not be {@literal null}.
204
- * @since 3.4
205
- * @deprecated since 3.4, use the constructors accepting {@link ValueExpressionDelegate} instead.
206
- */
207
- @ Deprecated (since = "3.4" )
208
- public StringBasedJdbcQuery (String query , JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
209
- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
210
- QueryMethodEvaluationContextProvider evaluationContextProvider ) {
211
- this (query , queryMethod , operations , rowMapperFactory , converter , new CachingValueExpressionDelegate (
212
- new QueryMethodValueEvaluationContextAccessor (new StandardEnvironment (), rootObject -> evaluationContextProvider
213
- .getEvaluationContext (queryMethod .getParameters (), new Object [] { rootObject })),
214
- ValueExpressionParser .create ()));
215
- }
216
-
217
150
@ Override
218
151
public Object execute (Object [] objects ) {
219
152
0 commit comments