3030import org .springframework .beans .BeanInstantiationException ;
3131import org .springframework .beans .BeanUtils ;
3232import org .springframework .beans .factory .BeanFactory ;
33- import org .springframework .core .env .StandardEnvironment ;
3433import org .springframework .data .expression .ValueEvaluationContext ;
35- import org .springframework .data .expression .ValueExpressionParser ;
3634import org .springframework .data .jdbc .core .convert .JdbcColumnTypes ;
3735import org .springframework .data .jdbc .core .convert .JdbcConverter ;
3836import org .springframework .data .jdbc .core .mapping .JdbcValue ;
3937import org .springframework .data .jdbc .support .JdbcUtil ;
4038import org .springframework .data .relational .core .mapping .RelationalMappingContext ;
4139import org .springframework .data .relational .repository .query .RelationalParameterAccessor ;
4240import org .springframework .data .relational .repository .query .RelationalParametersParameterAccessor ;
43- import org .springframework .data .repository .query .CachingValueExpressionDelegate ;
4441import org .springframework .data .repository .query .Parameter ;
4542import org .springframework .data .repository .query .Parameters ;
46- import org .springframework .data .repository .query .QueryMethodEvaluationContextProvider ;
47- import org .springframework .data .repository .query .QueryMethodValueEvaluationContextAccessor ;
4843import org .springframework .data .repository .query .ResultProcessor ;
4944import org .springframework .data .repository .query .ValueExpressionDelegate ;
5045import org .springframework .data .repository .query .ValueExpressionQueryRewriter ;
@@ -87,43 +82,6 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
8782 private final CachedResultSetExtractorFactory cachedResultSetExtractorFactory ;
8883 private final ValueExpressionDelegate delegate ;
8984
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-
12785 /**
12886 * Creates a new {@link StringBasedJdbcQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
12987 * and {@link RowMapperFactory}.
@@ -136,8 +94,7 @@ public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, NamedParameterJdbcOpera
13694 * @since 3.4
13795 */
13896 public StringBasedJdbcQuery (JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
139- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
140- ValueExpressionDelegate delegate ) {
97+ RowMapperFactory rowMapperFactory , JdbcConverter converter , ValueExpressionDelegate delegate ) {
14198 this (queryMethod .getRequiredQuery (), queryMethod , operations , rowMapperFactory , converter , delegate );
14299 }
143100
@@ -154,8 +111,7 @@ public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, NamedParameterJdbcOpera
154111 * @since 3.4
155112 */
156113 public StringBasedJdbcQuery (String query , JdbcQueryMethod queryMethod , NamedParameterJdbcOperations operations ,
157- RowMapperFactory rowMapperFactory , JdbcConverter converter ,
158- ValueExpressionDelegate delegate ) {
114+ RowMapperFactory rowMapperFactory , JdbcConverter converter , ValueExpressionDelegate delegate ) {
159115 super (queryMethod , operations );
160116 Assert .hasText (query , "Query must not be null or empty" );
161117 Assert .notNull (rowMapperFactory , "RowMapperFactory must not be null" );
@@ -191,29 +147,6 @@ public StringBasedJdbcQuery(String query, JdbcQueryMethod queryMethod, NamedPara
191147 this .delegate = delegate ;
192148 }
193149
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-
217150 @ Override
218151 public Object execute (Object [] objects ) {
219152
0 commit comments