[#1887] Remove all deprecated code
This commit is contained in:
parent
e68ed8358a
commit
156c69e6ba
@ -66,7 +66,7 @@ import org.jooq.util.oracle.OracleFactory;
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public interface Field<T> extends NamedTypeProviderQueryPart<T> {
|
||||
public interface Field<T> extends NamedQueryPart {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// API
|
||||
@ -89,19 +89,16 @@ public interface Field<T> extends NamedTypeProviderQueryPart<T> {
|
||||
/**
|
||||
* The Java type of the field.
|
||||
*/
|
||||
@Override
|
||||
Class<? extends T> getType();
|
||||
|
||||
/**
|
||||
* The type of this field (might not be dialect-specific)
|
||||
*/
|
||||
@Override
|
||||
DataType<T> getDataType();
|
||||
|
||||
/**
|
||||
* The dialect-specific type of this field
|
||||
*/
|
||||
@Override
|
||||
DataType<T> getDataType(Configuration configuration);
|
||||
|
||||
/**
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed to you under the Apache License, Version 2.0
|
||||
* (the "License"); You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* . Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* . Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* . Neither the name "jOOQ" nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.jooq;
|
||||
|
||||
/**
|
||||
* Any object providing a type.
|
||||
*
|
||||
* @param <T> The type provided by this type provider
|
||||
* @author Lukas Eder
|
||||
* @deprecated - 2.6.0 [#1870] - This marker interface does not have enough
|
||||
* momentum to be exposed in the public API. It will be removed in
|
||||
* the future.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NamedTypeProviderQueryPart<T> extends NamedQueryPart {
|
||||
|
||||
/**
|
||||
* The type of this object
|
||||
*/
|
||||
Class<? extends T> getType();
|
||||
|
||||
/**
|
||||
* The type of this object (might not be dialect-specific)
|
||||
*/
|
||||
DataType<T> getDataType();
|
||||
|
||||
/**
|
||||
* The dialect-specific type of this object
|
||||
*/
|
||||
DataType<T> getDataType(Configuration configuration);
|
||||
|
||||
}
|
||||
@ -45,7 +45,7 @@ import static org.jooq.SQLDialect.ORACLE;
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public interface Parameter<T> extends NamedTypeProviderQueryPart<T> {
|
||||
public interface Parameter<T> extends NamedQueryPart {
|
||||
|
||||
/**
|
||||
* The name of this parameter
|
||||
@ -56,19 +56,16 @@ public interface Parameter<T> extends NamedTypeProviderQueryPart<T> {
|
||||
/**
|
||||
* The Java type of the parameter.
|
||||
*/
|
||||
@Override
|
||||
Class<? extends T> getType();
|
||||
|
||||
/**
|
||||
* The type of this parameter (might not be dialect-specific)
|
||||
*/
|
||||
@Override
|
||||
DataType<T> getDataType();
|
||||
|
||||
/**
|
||||
* The dialect-specific type of this parameter
|
||||
*/
|
||||
@Override
|
||||
DataType<T> getDataType(Configuration configuration);
|
||||
|
||||
/**
|
||||
|
||||
@ -44,7 +44,7 @@ package org.jooq;
|
||||
* @see Field#desc()
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public interface SortField<T> extends NamedTypeProviderQueryPart<T> {
|
||||
public interface SortField<T> extends NamedQueryPart {
|
||||
|
||||
/**
|
||||
* The name of this sort field
|
||||
|
||||
@ -62,6 +62,7 @@ import org.jooq.CaseValueStep;
|
||||
import org.jooq.CaseWhenStep;
|
||||
import org.jooq.Comparator;
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.DataType;
|
||||
import org.jooq.DatePart;
|
||||
import org.jooq.Field;
|
||||
@ -73,15 +74,18 @@ import org.jooq.WindowIgnoreNullsStep;
|
||||
import org.jooq.WindowPartitionByStep;
|
||||
import org.jooq.tools.Convert;
|
||||
|
||||
abstract class AbstractField<T> extends AbstractNamedTypeProviderQueryPart<T> implements Field<T> {
|
||||
abstract class AbstractField<T> extends AbstractNamedQueryPart implements Field<T> {
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 2884811923648354905L;
|
||||
private final DataType<T> dataType;
|
||||
|
||||
AbstractField(String name, DataType<T> type) {
|
||||
super(name, type);
|
||||
super(name);
|
||||
|
||||
this.dataType = type;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@ -106,6 +110,21 @@ abstract class AbstractField<T> extends AbstractNamedTypeProviderQueryPart<T> im
|
||||
return new FieldAlias<T>(this, alias);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType(Configuration configuration) {
|
||||
return dataType.getDataType(configuration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Class<? extends T> getType() {
|
||||
return dataType.getType();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Type casts
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed to you under the Apache License, Version 2.0
|
||||
* (the "License"); You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* . Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* . Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* . Neither the name "jOOQ" nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.jooq.impl;
|
||||
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.DataType;
|
||||
import org.jooq.NamedTypeProviderQueryPart;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
abstract class AbstractNamedTypeProviderQueryPart<T> extends AbstractNamedQueryPart implements
|
||||
NamedTypeProviderQueryPart<T> {
|
||||
|
||||
private static final long serialVersionUID = -9087742153758783482L;
|
||||
private final DataType<T> type;
|
||||
|
||||
AbstractNamedTypeProviderQueryPart(String name, DataType<T> type) {
|
||||
super(name);
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
protected final SQLDataType<T> getSQLDataType() {
|
||||
return type.getSQLDataType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType(Configuration configuration) {
|
||||
return type.getDataType(configuration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Class<? extends T> getType() {
|
||||
return type.getType();
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,10 @@ class Cast<T> extends AbstractField<T> {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
private final SQLDataType<T> getSQLDataType() {
|
||||
return getDataType().getSQLDataType();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public final void toSQL(RenderContext context) {
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
package org.jooq.impl;
|
||||
|
||||
import org.jooq.BindContext;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.DataType;
|
||||
import org.jooq.Parameter;
|
||||
import org.jooq.RenderContext;
|
||||
@ -46,18 +47,35 @@ import org.jooq.RenderContext;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
class ParameterImpl<T> extends AbstractNamedTypeProviderQueryPart<T> implements Parameter<T> {
|
||||
class ParameterImpl<T> extends AbstractNamedQueryPart implements Parameter<T> {
|
||||
|
||||
private static final long serialVersionUID = -5277225593751085577L;
|
||||
|
||||
private final boolean isDefaulted;
|
||||
private final DataType<T> type;
|
||||
|
||||
ParameterImpl(String name, DataType<T> type, boolean isDefaulted) {
|
||||
super(name, type);
|
||||
super(name);
|
||||
|
||||
this.type = type;
|
||||
this.isDefaulted = isDefaulted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DataType<T> getDataType(Configuration configuration) {
|
||||
return type.getDataType(configuration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Class<? extends T> getType() {
|
||||
return type.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void bind(BindContext context) {}
|
||||
|
||||
|
||||
@ -70,7 +70,6 @@ import org.jooq.Record;
|
||||
import org.jooq.RecordHandler;
|
||||
import org.jooq.RecordMapper;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.Store;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.exception.InvalidResultException;
|
||||
import org.jooq.tools.Convert;
|
||||
@ -84,7 +83,6 @@ import org.w3c.dom.Element;
|
||||
* @author Lukas Eder
|
||||
* @author Ivan Dugic
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
|
||||
|
||||
/**
|
||||
@ -120,7 +118,7 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
|
||||
public final List<Attachable> getAttachables() {
|
||||
List<Attachable> result = new ArrayList<Attachable>();
|
||||
|
||||
for (Store<?> item : records) {
|
||||
for (Attachable item : records) {
|
||||
if (item != null) {
|
||||
result.add(item);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ import org.jooq.RenderContext;
|
||||
import org.jooq.SortField;
|
||||
import org.jooq.SortOrder;
|
||||
|
||||
class SortFieldImpl<T> extends AbstractNamedTypeProviderQueryPart<T> implements SortField<T> {
|
||||
class SortFieldImpl<T> extends AbstractNamedQueryPart implements SortField<T> {
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
@ -58,7 +58,7 @@ class SortFieldImpl<T> extends AbstractNamedTypeProviderQueryPart<T> implements
|
||||
private boolean nullsLast;
|
||||
|
||||
SortFieldImpl(Field<T> field, SortOrder order) {
|
||||
super(field.getName(), field.getDataType());
|
||||
super(field.getName());
|
||||
|
||||
this.field = field;
|
||||
this.order = order;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user