|
15 | 15 | */
|
16 | 16 | package org.springframework.data.jpa.repository.query;
|
17 | 17 |
|
18 |
| -import static org.springframework.data.jpa.repository.query.QueryParameterSetter.ErrorHandling.LENIENT; |
| 18 | +import static org.springframework.data.jpa.repository.query.QueryParameterSetter.ErrorHandling.*; |
19 | 19 |
|
20 | 20 | import java.lang.reflect.Proxy;
|
21 | 21 | import java.util.Collections;
|
|
27 | 27 |
|
28 | 28 | import javax.persistence.Parameter;
|
29 | 29 | import javax.persistence.Query;
|
30 |
| -import javax.persistence.StoredProcedureQuery; |
31 | 30 | import javax.persistence.TemporalType;
|
32 | 31 | import javax.persistence.criteria.ParameterExpression;
|
33 | 32 |
|
34 | 33 | import org.apache.commons.logging.Log;
|
35 | 34 | import org.apache.commons.logging.LogFactory;
|
36 |
| -import org.hibernate.jpa.TypedParameterValue; |
37 | 35 | import org.springframework.lang.Nullable;
|
38 | 36 | import org.springframework.util.Assert;
|
39 | 37 |
|
@@ -85,21 +83,7 @@ class NamedOrIndexedQueryParameterSetter implements QueryParameterSetter {
|
85 | 83 | public void setParameter(BindableQuery query, JpaParametersParameterAccessor accessor,
|
86 | 84 | ErrorHandling errorHandling) {
|
87 | 85 |
|
88 |
| - final Object value; |
89 |
| - |
90 |
| - // TODO: When https://github.com/hibernate/hibernate-orm/pull/5438 is merged we should be able to drop this. |
91 |
| - if (query.getQuery() instanceof StoredProcedureQuery) { |
92 |
| - |
93 |
| - Object extractedValue = valueExtractor.apply(accessor); |
94 |
| - |
95 |
| - if (extractedValue instanceof TypedParameterValue) { |
96 |
| - value = ((TypedParameterValue) extractedValue).getValue(); |
97 |
| - } else { |
98 |
| - value = extractedValue; |
99 |
| - } |
100 |
| - } else { |
101 |
| - value = valueExtractor.apply(accessor); |
102 |
| - } |
| 86 | + final Object value = valueExtractor.apply(accessor); |
103 | 87 |
|
104 | 88 | if (temporalType != null) {
|
105 | 89 |
|
|
0 commit comments