[#4991] Deprecate Param.setValue(), setConverted(), setInline()

This commit is contained in:
lukaseder 2016-01-25 16:34:03 +01:00
parent 3605b32d79
commit 3ff956b6b8
3 changed files with 20 additions and 0 deletions

View File

@ -83,7 +83,11 @@ public interface Param<T> extends Field<T> {
* {@link #setConverted(Object)}, but ensures generic type-safety.
*
* @see #setConverted(Object)
* @deprecated - 3.8.0 - [#4991] In jOOQ 4.0, {@link Param} will be made
* immutable. Modifying {@link Param} values is strongly
* discouraged.
*/
@Deprecated
void setValue(T value);
/**
@ -94,12 +98,21 @@ public interface Param<T> extends Field<T> {
* @see Convert#convert(Object, Class)
* @throws DataTypeException If <code>value</code> cannot be converted into
* this parameter's data type.
* @deprecated - 3.8.0 - [#4991] In jOOQ 4.0, {@link Param} will be made
* immutable. Modifying {@link Param} values is strongly
* discouraged.
*/
@Deprecated
void setConverted(Object value) throws DataTypeException;
/**
* A flag on the bind value to force it to be inlined in rendered SQL
*
* @deprecated - 3.8.0 - [#4991] In jOOQ 4.0, {@link Param} will be made
* immutable. Modifying {@link Param} values is strongly
* discouraged.
*/
@Deprecated
void setInline(boolean inline);
/**

View File

@ -150,6 +150,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
* <p>
* {@inheritDoc}
*/
@SuppressWarnings("deprecation")
@Override
public Query bind(String param, Object value) {
try {
@ -178,6 +179,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
* <p>
* {@inheritDoc}
*/
@SuppressWarnings("deprecation")
@Override
public Query bind(int index, Object value) {
Param<?>[] params = getParams().values().toArray(new Param[0]);

View File

@ -14292,6 +14292,7 @@ public class DSL {
*
* @see #val(Object)
*/
@SuppressWarnings("deprecation")
@Support
public static <T> Param<T> inline(T value) {
Param<T> val = val(value);
@ -14980,6 +14981,7 @@ public class DSL {
*
* @see #val(Object, Class)
*/
@SuppressWarnings("deprecation")
@Support
public static <T> Param<T> inline(Object value, Class<T> type) {
Param<T> val = val(value, type);
@ -15002,6 +15004,7 @@ public class DSL {
*
* @see #val(Object, Field)
*/
@SuppressWarnings("deprecation")
@Support
public static <T> Param<T> inline(Object value, Field<T> field) {
Param<T> val = val(value, field);
@ -15024,6 +15027,7 @@ public class DSL {
*
* @see #val(Object, DataType)
*/
@SuppressWarnings("deprecation")
@Support
public static <T> Param<T> inline(Object value, DataType<T> type) {
Param<T> val = val(value, type);
@ -15417,6 +15421,7 @@ public class DSL {
* @param dataType The coercion data type
* @return The most specific data type
*/
@SuppressWarnings("deprecation")
private static <T> DataType<T> mostSpecific(T value, DataType<T> dataType) {
// [#3888] With custom data type conversion, users may wish to