Remove confusing [java-8] tags in OSS edition

This commit is contained in:
lukaseder 2015-12-17 15:05:01 +01:00
parent 7a05238129
commit eb4702ea6c
45 changed files with 201 additions and 201 deletions

View File

@ -4830,9 +4830,9 @@ public class JavaGenerator extends AbstractGenerator {
return getJavaType(type1).equals(getJavaType(type2));
}
/* [java-8] */
@SafeVarargs
/* [/java-8] */
private static final <T> List<T> list(T... objects) {
List<T> result = new ArrayList<T>();

View File

@ -53,9 +53,9 @@ import org.jooq.exception.DataAccessException;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface ConnectionCallable<T> {
/**

View File

@ -53,9 +53,9 @@ import org.jooq.exception.DataAccessException;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface ConnectionRunnable {
/**

View File

@ -48,9 +48,9 @@ package org.jooq;
* @deprecated - This API is still EXPERIMENTAL. Do not use yet
*/
@Deprecated
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface ConverterProvider {
/**

View File

@ -68,7 +68,7 @@ import org.jooq.impl.DefaultRecordMapper;
* @param <R> The cursor's record type
* @author Lukas Eder
*/
public interface Cursor<R extends Record> extends Iterable<R> /* [java-8] */, AutoCloseable /* [/java-8] */ {
public interface Cursor<R extends Record> extends Iterable<R> , AutoCloseable {
/**
* Get this cursor's row type.
@ -332,7 +332,7 @@ public interface Cursor<R extends Record> extends Iterable<R> /* [java-8] */, Au
*/
<Z extends Record> Z fetchOneInto(Table<Z> table) throws DataAccessException, MappingException;
/* [java-8] */
/**
* Fetch the next record from the cursor.
* <p>
@ -403,7 +403,7 @@ public interface Cursor<R extends Record> extends Iterable<R> /* [java-8] */, Au
* @throws DataAccessException if something went wrong executing the query
*/
Stream<R> stream() throws DataAccessException;
/* [/java-8] */
/**
* Explicitly close the underlying {@link PreparedStatement} and
@ -415,9 +415,9 @@ public interface Cursor<R extends Record> extends Iterable<R> /* [java-8] */, Au
*
* @throws DataAccessException if something went wrong executing the query
*/
/* [java-8] */
@Override
/* [/java-8] */
void close() throws DataAccessException;
/**

View File

@ -260,7 +260,7 @@ public interface DAO<R extends TableRecord<R>, P, T> {
*/
<Z> P fetchOne(Field<Z> field, Z value) throws DataAccessException;
/* [java-8] */
/**
* Find a unique record by a given field and a value.
*
@ -274,7 +274,7 @@ public interface DAO<R extends TableRecord<R>, P, T> {
* </ul>
*/
<Z> Optional<P> fetchOptional(Field<Z> field, Z value) throws DataAccessException;
/* [/java-8] */
/**
* Get the underlying table

View File

@ -123,7 +123,7 @@ import org.jooq.tools.jdbc.MockRunnable;
* @see Configuration
* @author Lukas Eder
*/
public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/java-8] */ {
public interface DSLContext extends Scope , AutoCloseable {
// -------------------------------------------------------------------------
// XXX AutoCloseable API
@ -143,9 +143,9 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
* @throws DataAccessException When something went wrong closing the
* underlying resources.
*/
/* [java-8] */
@Override
/* [/java-8] */
void close() throws DataAccessException;
// -------------------------------------------------------------------------
@ -769,7 +769,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@PlainSQL
Cursor<Record> fetchLazy(String sql, QueryPart... parts) throws DataAccessException;
/* [java-8] */
/**
* Execute a new query holding plain SQL and "lazily" return the generated
* result.
@ -915,7 +915,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
@PlainSQL
Stream<Record> fetchStream(String sql, QueryPart... parts) throws DataAccessException;
/* [/java-8] */
/**
* Execute a new query holding plain SQL, possibly returning several result
@ -1149,7 +1149,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@PlainSQL
Record fetchOne(String sql, QueryPart... parts) throws DataAccessException, TooManyRowsException;
/* [java-8] */
/**
* Execute a new query holding plain SQL.
* <p>
@ -1267,7 +1267,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
@PlainSQL
Optional<Record> fetchOptional(String sql, QueryPart... parts) throws DataAccessException, TooManyRowsException;
/* [/java-8] */
/**
* Execute a new query holding plain SQL.
@ -1399,7 +1399,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@PlainSQL
Object fetchValue(String sql, QueryPart... parts) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [java-8] */
/**
* Execute a new query holding plain SQL.
* <p>
@ -1525,7 +1525,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
@PlainSQL
Optional<?> fetchOptionalValue(String sql, QueryPart... parts) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [/java-8] */
/**
* Execute a new query holding plain SQL.
@ -2059,7 +2059,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
Record fetchOne(ResultSet rs, Class<?>... types) throws DataAccessException, TooManyRowsException;
/* [java-8] */
/**
* Fetch a record from a JDBC {@link ResultSet} and transform it to a jOOQ
* {@link Record}.
@ -2131,7 +2131,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
@Support
Optional<Record> fetchOptional(ResultSet rs, Class<?>... types) throws DataAccessException, TooManyRowsException;
/* [/java-8] */
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
@ -2213,7 +2213,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
<T> T fetchValue(ResultSet rs, Class<T> type) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [java-8] */
/**
* Fetch a record from a JDBC {@link ResultSet} and return the only
* contained value.
@ -2293,7 +2293,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
@Support
<T> Optional<T> fetchOptionalValue(ResultSet rs, Class<T> type) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [/java-8] */
/**
* Fetch a result from a JDBC {@link ResultSet} and return the only
@ -2415,7 +2415,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
Cursor<Record> fetchLazy(ResultSet rs, Class<?>... types) throws DataAccessException;
/* [java-8] */
/**
* Wrap a JDBC {@link ResultSet} into a jOOQ {@link Stream}.
* <p>
@ -2479,7 +2479,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
@Support
Stream<Record> fetchStream(ResultSet rs, Class<?>... types) throws DataAccessException;
/* [/java-8] */
/**
* Fetch all data from a formatted string.
@ -8198,7 +8198,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
<R extends Record> Cursor<R> fetchLazy(ResultQuery<R> query) throws DataAccessException;
/* [java-8] */
/**
* Execute a {@link ResultQuery} in the context of this <code>DSLContext</code> and return
* a stream.
@ -8209,7 +8209,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
* @see ResultQuery#stream()
*/
<R extends Record> Stream<R> fetchStream(ResultQuery<R> query) throws DataAccessException;
/* [/java-8] */
/**
* Execute a {@link ResultQuery} in the context of this <code>DSLContext</code> and return
@ -8234,7 +8234,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
<R extends Record> R fetchOne(ResultQuery<R> query) throws DataAccessException, TooManyRowsException;
/* [java-8] */
/**
* Execute a {@link ResultQuery} in the context of this <code>DSLContext</code> and return
* a record.
@ -8246,7 +8246,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
* @see ResultQuery#fetchOptional()
*/
<R extends Record> Optional<R> fetchOptional(ResultQuery<R> query) throws DataAccessException, TooManyRowsException;
/* [/java-8] */
/**
* Execute a {@link ResultQuery} in the context of this
@ -8275,7 +8275,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
<T> T fetchValue(TableField<?, T> field) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [java-8] */
/**
* Execute a {@link ResultQuery} in the context of this
* <code>DSLContext</code> and return a single value.
@ -8301,7 +8301,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
* than one value
*/
<T> Optional<T> fetchOptionalValue(TableField<?, T> field) throws DataAccessException, TooManyRowsException, InvalidResultException;
/* [/java-8] */
/**
* Execute a {@link ResultQuery} in the context of this
@ -8481,7 +8481,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
<R extends Record> R fetchOne(Table<R> table, Condition condition) throws DataAccessException, TooManyRowsException;
/* [java-8] */
/**
* Execute and return zero or one record for
* <code><pre>SELECT * FROM [table]</pre></code>.
@ -8511,7 +8511,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
@Support
<R extends Record> Optional<R> fetchOptional(Table<R> table, Condition condition) throws DataAccessException, TooManyRowsException;
/* [/java-8] */
/**
* Execute and return zero or one record for
@ -8567,7 +8567,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
@Support
<R extends Record> Cursor<R> fetchLazy(Table<R> table, Condition condition) throws DataAccessException;
/* [java-8] */
/**
* Execute and return all records lazily for
* <code><pre>SELECT * FROM [table]</pre></code>.
@ -8593,7 +8593,7 @@ public interface DSLContext extends Scope /* [java-8] */, AutoCloseable /* [/jav
*/
@Support
<R extends Record> Stream<R> fetchStream(Table<R> table, Condition condition) throws DataAccessException;
/* [/java-8] */
/**
* Insert one record.

View File

@ -103,7 +103,7 @@ public interface DeleteResultStep<R extends Record> extends Delete<R> {
@Support({ FIREBIRD, POSTGRES })
R fetchOne() throws DataAccessException;
/* [java-8] */
/**
* The record holding returned values as specified by the
* {@link UpdateReturningStep}.
@ -115,5 +115,5 @@ public interface DeleteResultStep<R extends Record> extends Delete<R> {
*/
@Support({ FIREBIRD, POSTGRES })
Optional<R> fetchOptional() throws DataAccessException;
/* [/java-8] */
}

View File

@ -55,9 +55,9 @@ import org.jooq.impl.DefaultExecuteListenerProvider;
* @see ExecuteListener
* @see Configuration
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface ExecuteListenerProvider {
/**

View File

@ -110,7 +110,7 @@ public interface InsertResultStep<R extends Record> extends Insert<R> {
@Support
R fetchOne() throws DataAccessException;
/* [java-8] */
/**
* The record holding returned values as specified by the
* {@link InsertReturningStep}.
@ -122,5 +122,5 @@ public interface InsertResultStep<R extends Record> extends Insert<R> {
*/
@Support
Optional<R> fetchOptional() throws DataAccessException;
/* [/java-8] */
}

View File

@ -58,7 +58,7 @@ import org.jooq.impl.DSL;
*
* @author Lukas Eder
*/
public interface Query extends QueryPart, Attachable /* [java-8] */, AutoCloseable /* [/java-8] */ {
public interface Query extends QueryPart, Attachable , AutoCloseable {
/**
* Execute the query, if it has been created with a proper configuration.
@ -282,9 +282,9 @@ public interface Query extends QueryPart, Attachable /* [java-8] */, AutoCloseab
* @throws DataAccessException If something went wrong closing the statement
* @see Statement#close()
*/
/* [java-8] */
@Override
/* [/java-8] */
void close() throws DataAccessException;
/**

View File

@ -46,9 +46,9 @@ package org.jooq;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface RecordHandler<R extends Record> {
/**

View File

@ -55,9 +55,9 @@ import org.jooq.impl.DefaultRecordListenerProvider;
* @see RecordListener
* @see Configuration
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface RecordListenerProvider {
/**

View File

@ -47,9 +47,9 @@ package org.jooq;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface RecordMapper<R extends Record, E> {
/**

View File

@ -85,9 +85,9 @@ import org.jooq.impl.DefaultRecordMapperProvider;
* @see RecordMapper
* @see Configuration
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface RecordMapperProvider {
/**

View File

@ -145,7 +145,7 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
@Override
Iterator<R> iterator() throws DataAccessException;
/* [java-8] */
/**
* Stream this query.
* <p>
@ -179,7 +179,7 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
* @throws DataAccessException if something went wrong executing the query
*/
Stream<R> stream() throws DataAccessException;
/* [/java-8] */
/**
* Execute the query and "lazily" return the generated result.
@ -665,7 +665,7 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<Z extends Record> Z fetchOneInto(Table<Z> table) throws DataAccessException, TooManyRowsException;
/* [java-8] */
/**
* Execute the query and return at most one resulting value for a
* field from the generated result.
@ -906,7 +906,7 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
* @throws TooManyRowsException if the query returned more than one record
*/
<Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table) throws DataAccessException, TooManyRowsException;
/* [/java-8] */
/**
* Execute the query and return at most one resulting value for a

View File

@ -45,9 +45,9 @@ package org.jooq;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface TransactionalCallable<T> {
/**

View File

@ -45,9 +45,9 @@ package org.jooq;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface TransactionalRunnable {
/**

View File

@ -106,7 +106,7 @@ public interface UpdateResultStep<R extends Record> extends Update<R> {
@Support({ FIREBIRD, POSTGRES })
R fetchOne() throws DataAccessException;
/* [java-8] */
/**
* The record holding returned values as specified by the
* {@link UpdateReturningStep}.
@ -118,5 +118,5 @@ public interface UpdateResultStep<R extends Record> extends Update<R> {
*/
@Support({ FIREBIRD, POSTGRES })
Optional<R> fetchOptional() throws DataAccessException;
/* [/java-8] */
}

View File

@ -55,9 +55,9 @@ import org.jooq.impl.DefaultVisitListenerProvider;
* @see VisitListener
* @see Configuration
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface VisitListenerProvider {
/**

View File

@ -282,9 +282,9 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final SortField<Integer> sortAsc(T... sortList) {
return sortAsc(Arrays.asList(sortList));
}
@ -302,9 +302,9 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final SortField<Integer> sortDesc(T... sortList) {
return sortDesc(Arrays.asList(sortList));
}
@ -1856,9 +1856,9 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
@Override
@Deprecated
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final Field<T> greatest(T... others) {
return DSL.greatest(this, Utils.fields(others).toArray(new Field[0]));
}
@ -1871,9 +1871,9 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
@Override
@Deprecated
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final Field<T> least(T... others) {
return DSL.least(this, Utils.fields(others).toArray(new Field[0]));
}
@ -1946,9 +1946,9 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
@Override
@Deprecated
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final Field<T> coalesce(T option, T... options) {
return DSL.coalesce(this, Utils.combine(Utils.field(option), Utils.fields(options).toArray(new Field[0])));
}

View File

@ -63,9 +63,9 @@ abstract class AbstractKey<R extends Record> implements Key<R> {
private final Table<R> table;
private final TableField<R, ?>[] fields;
/* [java-8] */
@SafeVarargs
/* [/java-8] */
AbstractKey(Table<R> table, TableField<R, ?>... fields) {
this.table = table;
this.fields = fields;

View File

@ -66,9 +66,9 @@ public abstract class AbstractKeys {
/**
* Factory method for unique keys
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
protected static <R extends Record> UniqueKey<R> createUniqueKey(Table<R> table, TableField<R, ?>... fields) {
return new UniqueKeyImpl<R>(table, fields);
}
@ -76,9 +76,9 @@ public abstract class AbstractKeys {
/**
* Factory method for foreign keys
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
protected static <R extends Record, U extends Record> ForeignKey<R, U> createForeignKey(UniqueKey<U> key, Table<R> table, TableField<R, ?>... fields) {
ForeignKey<R, U> result = new ReferenceImpl<R, U>(key, table, fields);

View File

@ -319,7 +319,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return fetch().iterator();
}
/* [java-8] */
@Override
public final Stream<R> fetchStream() {
return fetchLazy().stream();
@ -329,7 +329,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
public final Stream<R> stream() {
return fetchLazy().stream();
}
/* [/java-8] */
@Override
public final Cursor<R> fetchLazy() {
@ -531,7 +531,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return record == null ? null : record.into(table);
}
/* [java-8] */
@Override
public final <T> Optional<T> fetchOptional(Field<T> field) {
return Optional.ofNullable(fetchOne(field));
@ -621,7 +621,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
public final <Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table) {
return Optional.ofNullable(fetchOneInto(table));
}
/* [/java-8] */
@Override
public final <T> T fetchAny(Field<T> field) {

View File

@ -130,9 +130,9 @@ class BatchSingle implements BatchBindStep {
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final BatchSingle bind(Map<String, Object>... namedBindValues) {
List<Object> defaultValues = query.getBindValues();

View File

@ -209,7 +209,7 @@ class CursorImpl<R extends Record> implements Cursor<R> {
return iterator;
}
/* [java-8] */
@Override
public final Stream<R> stream() throws DataAccessException {
return StreamSupport.stream(
@ -221,7 +221,7 @@ class CursorImpl<R extends Record> implements Cursor<R> {
false
).onClose(() -> close());
}
/* [/java-8] */
@Override
public final boolean hasNext() {
@ -244,7 +244,7 @@ class CursorImpl<R extends Record> implements Cursor<R> {
return null;
}
/* [java-8] */
@Override
public final Optional<R> fetchOptional() throws DataAccessException {
return Optional.ofNullable(fetchOne());
@ -264,7 +264,7 @@ class CursorImpl<R extends Record> implements Cursor<R> {
public final <Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table) {
return Optional.ofNullable(fetchOneInto(table));
}
/* [/java-8] */
@Override
public final Result<R> fetch(int number) {

View File

@ -141,9 +141,9 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final void insert(P... objects) {
insert(asList(objects));
}
@ -168,9 +168,9 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final void update(P... objects) {
update(asList(objects));
}
@ -190,9 +190,9 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final void delete(P... objects) {
delete(asList(objects));
}
@ -209,9 +209,9 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final void deleteById(T... ids) {
deleteById(asList(ids));
}
@ -296,12 +296,12 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
return record == null ? null : mapper().map(record);
}
/* [java-8] */
@Override
public final <Z> Optional<P> fetchOptional(Field<Z> field, Z value) {
return Optional.ofNullable(fetchOne(field, value));
}
/* [/java-8] */
@Override
public final Table<R> getTable() {

View File

@ -12767,9 +12767,9 @@ public class DSL {
* </tr>
* </table>
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
@Support({ H2, HSQLDB, POSTGRES })
public static <T> Field<T[]> array(Field<T>... fields) {
return array(Arrays.asList(fields));
@ -13951,7 +13951,7 @@ public class DSL {
return value((Object) value, SQLDataType.TIMESTAMP);
}
/* [java-8] */
/**
* A synonym for {@link #val(Object)} to be used in Scala and Groovy, where
* <code>val</code> is a reserved keyword.
@ -14001,7 +14001,7 @@ public class DSL {
public static Param<OffsetDateTime> value(OffsetDateTime value) {
return value((Object) value, SQLDataType.OFFSETDATETIME);
}
/* [/java-8] */
/**
* A synonym for {@link #val(Object)} to be used in Scala and Groovy, where
@ -14568,7 +14568,7 @@ public class DSL {
return inline((Object) value, SQLDataType.TIMESTAMP);
}
/* [java-8] */
/**
* Create a bind value that is always inlined.
* <p>
@ -14668,7 +14668,7 @@ public class DSL {
public static Param<OffsetDateTime> inline(OffsetDateTime value) {
return inline((Object) value, SQLDataType.OFFSETDATETIME);
}
/* [/java-8] */
/**
* Create a bind value that is always inlined.
@ -15055,7 +15055,7 @@ public class DSL {
return val((Object) value, SQLDataType.TIMESTAMP);
}
/* [java-8] */
/**
* Get a bind value.
*
@ -15100,7 +15100,7 @@ public class DSL {
public static Param<OffsetDateTime> val(OffsetDateTime value) {
return val((Object) value, SQLDataType.OFFSETDATETIME);
}
/* [/java-8] */
/**
* Get a bind value.

View File

@ -323,14 +323,14 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
}
}
/* [java-8] */
if (type == OffsetTime.class || type == OffsetDateTime.class) {
switch (ctx.family()) {
case POSTGRES:
return true;
}
}
/* [/java-8] */
return false;
}
@ -993,7 +993,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
}
}
/* [java-8] */
else if (actualType == LocalDate.class) {
ctx.statement().setDate(ctx.index(), Date.valueOf((LocalDate) value));
}
@ -1009,7 +1009,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
else if (actualType == OffsetDateTime.class) {
ctx.statement().setString(ctx.index(), value.toString());
}
/* [/java-8] */
// [#566] Interval data types are best bound as Strings
else if (actualType == YearToMonth.class) {
@ -1314,7 +1314,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
else if (type == Integer.class) {
result = (T) wasNull(ctx.resultSet(), Integer.valueOf(ctx.resultSet().getInt(ctx.index())));
}
/* [java-8] */
else if (type == LocalDate.class) {
result = (T) localDate(getDate(ctx.configuration().dialect(), ctx.resultSet(), ctx.index()));
}
@ -1324,18 +1324,18 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
else if (type == LocalDateTime.class) {
result = (T) localDateTime(getTimestamp(ctx.configuration().dialect(), ctx.resultSet(), ctx.index()));
}
/* [/java-8] */
else if (type == Long.class) {
result = (T) wasNull(ctx.resultSet(), Long.valueOf(ctx.resultSet().getLong(ctx.index())));
}
/* [java-8] */
else if (type == OffsetTime.class) {
result = (T) offsetTime(ctx.resultSet().getString(ctx.index()));
}
else if (type == OffsetDateTime.class) {
result = (T) offsetDateTime(ctx.resultSet().getString(ctx.index()));
}
/* [/java-8] */
else if (type == Short.class) {
result = (T) wasNull(ctx.resultSet(), Short.valueOf(ctx.resultSet().getShort(ctx.index())));
}
@ -1456,7 +1456,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
ctx.value(converter.from(result));
}
/* [java-8] */
private final LocalDate localDate(Date date) {
return date == null ? null : date.toLocalDate();
}
@ -1495,7 +1495,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
return OffsetDateTime.parse(string);
}
/* [/java-8] */
@SuppressWarnings("unchecked")
@Override

View File

@ -368,9 +368,9 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
// [#3718] Use reflection to support also JDBC 4.0
catch (Exception suppress) {
/* [java-8] */
cause.addSuppressed(suppress);
/* [/java-8] */
}
if (cause instanceof RuntimeException) {
@ -602,7 +602,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return resultQuery(sql, parts).fetchLazy();
}
/* [java-8] */
@Override
public Stream<Record> fetchStream(SQL sql) {
return resultQuery(sql).stream();
@ -622,7 +622,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public Stream<Record> fetchStream(String sql, QueryPart... parts) {
return resultQuery(sql, parts).stream();
}
/* [/java-8] */
@Override
public Results fetchMany(SQL sql) {
@ -664,7 +664,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return resultQuery(sql, parts).fetchOne();
}
/* [java-8] */
@Override
public Optional<Record> fetchOptional(SQL sql) {
return Optional.ofNullable(fetchOne(sql));
@ -684,7 +684,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public Optional<Record> fetchOptional(String sql, QueryPart... parts) {
return Optional.ofNullable(fetchOne(sql, parts));
}
/* [/java-8] */
@Override
public Object fetchValue(SQL sql) {
@ -706,7 +706,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return fetchValue((ResultQuery) resultQuery(sql, parts));
}
/* [java-8] */
@Override
public Optional<?> fetchOptionalValue(SQL sql) {
return Optional.ofNullable(fetchValue(sql));
@ -726,7 +726,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public Optional<?> fetchOptionalValue(String sql, QueryPart... parts) {
return Optional.ofNullable(fetchValue(sql, parts));
}
/* [/java-8] */
@Override
public List<?> fetchValues(SQL sql) {
@ -832,7 +832,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return Utils.fetchOne(fetchLazy(rs, types));
}
/* [java-8] */
@Override
public Optional<Record> fetchOptional(ResultSet rs) {
return Optional.ofNullable(fetchOne(rs));
@ -852,7 +852,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public Optional<Record> fetchOptional(ResultSet rs, Class<?>... types) {
return Optional.ofNullable(fetchOne(rs, types));
}
/* [/java-8] */
@Override
public Object fetchValue(ResultSet rs) {
@ -874,7 +874,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return (T) value1((Record1) fetchOne(rs, type));
}
/* [java-8] */
@Override
public Optional<?> fetchOptionalValue(ResultSet rs) {
return Optional.ofNullable(fetchValue(rs));
@ -894,7 +894,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public <T> Optional<T> fetchOptionalValue(ResultSet rs, Class<T> type) {
return Optional.ofNullable(fetchValue(rs, type));
}
/* [/java-8] */
@Override
public List<?> fetchValues(ResultSet rs) {
@ -958,7 +958,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return fetchLazy(rs, Utils.dataTypes(types));
}
/* [java-8] */
@Override
public Stream<Record> fetchStream(ResultSet rs) {
return fetchLazy(rs).stream();
@ -978,7 +978,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public Stream<Record> fetchStream(ResultSet rs, Class<?>... types) {
return fetchLazy(rs, types).stream();
}
/* [/java-8] */
@Override
public Result<Record> fetchFromTXT(String string) {
@ -2839,7 +2839,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
}
}
/* [java-8] */
@Override
public <R extends Record> Stream<R> fetchStream(ResultQuery<R> query) {
final Configuration previous = Utils.getConfiguration(query);
@ -2852,7 +2852,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
query.attach(previous);
}
}
/* [/java-8] */
@Override
public <R extends Record> Results fetchMany(ResultQuery<R> query) {
@ -2880,12 +2880,12 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
}
}
/* [java-8] */
@Override
public <R extends Record> Optional<R> fetchOptional(ResultQuery<R> query) {
return Optional.ofNullable(fetchOne(query));
}
/* [/java-8] */
@Override
public <T, R extends Record1<T>> T fetchValue(ResultQuery<R> query) {
@ -2905,7 +2905,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return fetchValue(select(field).from(field.getTable()));
}
/* [java-8] */
@Override
public <T, R extends Record1<T>> Optional<T> fetchOptionalValue(ResultQuery<R> query) {
return Optional.ofNullable(fetchValue(query));
@ -2915,7 +2915,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public <T> Optional<T> fetchOptionalValue(TableField<?, T> field) {
return Optional.ofNullable(fetchValue(field));
}
/* [/java-8] */
@Override
public <T, R extends Record1<T>> List<T> fetchValues(ResultQuery<R> query) {
@ -3004,7 +3004,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return Utils.fetchOne(fetchLazy(table, condition));
}
/* [java-8] */
@Override
public <R extends Record> Optional<R> fetchOptional(Table<R> table) {
return Optional.ofNullable(fetchOne(table));
@ -3014,7 +3014,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public <R extends Record> Optional<R> fetchOptional(Table<R> table, Condition condition) {
return Optional.ofNullable(fetchOne(table, condition));
}
/* [/java-8] */
@Override
public <R extends Record> R fetchAny(Table<R> table) {
@ -3036,7 +3036,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return selectFrom(table).where(condition).fetchLazy();
}
/* [java-8] */
@Override
public <R extends Record> Stream<R> fetchStream(Table<R> table) {
return fetchStream(table, trueCondition());
@ -3046,7 +3046,7 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
public <R extends Record> Stream<R> fetchStream(Table<R> table, Condition condition) {
return selectFrom(table).where(condition).stream();
}
/* [/java-8] */
@Override
public <R extends TableRecord<R>> int executeInsert(R record) {

View File

@ -775,9 +775,9 @@ public class DefaultDataType<T> implements DataType<T> {
@Override
public final boolean isDateTime() {
return java.util.Date.class.isAssignableFrom(type)
/* [java-8] */
|| java.time.temporal.Temporal.class.isAssignableFrom(type)
/* [/java-8] */
;
}

View File

@ -286,10 +286,10 @@ class DeleteImpl<R extends Record>
return getDelegate().getReturnedRecord();
}
/* [java-8] */
@Override
public final Optional<R> fetchOptional() {
return Optional.ofNullable(fetchOne());
}
/* [/java-8] */
}

View File

@ -669,10 +669,10 @@ class InsertImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().getReturnedRecord();
}
/* [java-8] */
@Override
public final Optional<R> fetchOptional() {
return Optional.ofNullable(fetchOne());
}
/* [/java-8] */
}

View File

@ -46,9 +46,9 @@ import org.jooq.Record;
* @author Lukas Eder
* @author Arnaud Roger
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
interface RecordFactory<R extends Record> {
/**

View File

@ -73,9 +73,9 @@ class ReferenceImpl<R extends Record, O extends Record> extends AbstractKey<R> i
private final UniqueKey<O> key;
/* [java-8] */
@SafeVarargs
/* [/java-8] */
ReferenceImpl(UniqueKey<O> key, Table<R> table, TableField<R, ?>... fields) {
super(table, fields);
@ -93,9 +93,9 @@ class ReferenceImpl<R extends Record, O extends Record> extends AbstractKey<R> i
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final Result<O> fetchParents(R... records) {
return fetchParents(list(records));
}
@ -106,9 +106,9 @@ class ReferenceImpl<R extends Record, O extends Record> extends AbstractKey<R> i
}
@Override
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public final Result<R> fetchChildren(O... records) {
return fetchChildren(list(records));
}

View File

@ -272,7 +272,7 @@ public final class SQLDataType {
*/
public static final DataType<DayToSecond> INTERVALDAYTOSECOND = new DefaultDataType<DayToSecond>(null, DayToSecond.class, "interval day to second");
/* [java-8] */
// -------------------------------------------------------------------------
// JSR310 types
// -------------------------------------------------------------------------
@ -315,7 +315,7 @@ public final class SQLDataType {
* An alias for {@link #OFFSETDATETIME}
*/
public static final DataType<OffsetDateTime> TIMESTAMPWITHTIMEZONE = OFFSETDATETIME;
/* [/java-8] */
// -------------------------------------------------------------------------
// Binary types

View File

@ -2703,7 +2703,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().iterator();
}
/* [java-8] */
@Override
public final Stream<R> fetchStream() {
return getDelegate().fetchStream();
@ -2713,7 +2713,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
public final Stream<R> stream() {
return getDelegate().stream();
}
/* [/java-8] */
@Override
public final Cursor<R> fetchLazy() {
@ -2881,7 +2881,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().fetchOneInto(table);
}
/* [java-8] */
@Override
public final <T> Optional<T> fetchOptional(Field<T> field) {
return getDelegate().fetchOptional(field);
@ -2971,7 +2971,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
public final <Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table) {
return getDelegate().fetchOptionalInto(table);
}
/* [/java-8] */
@Override
public final <T> T fetchAny(Field<T> field) {

View File

@ -63,9 +63,9 @@ class UniqueKeyImpl<R extends Record> extends AbstractKey<R> implements UniqueKe
final List<ForeignKey<?, R>> references;
/* [java-8] */
@SafeVarargs
/* [/java-8] */
UniqueKeyImpl(Table<R> table, TableField<R, ?>... fields) {
super(table, fields);

View File

@ -741,10 +741,10 @@ final class UpdateImpl<R extends Record>
return getDelegate().getReturnedRecord();
}
/* [java-8] */
@Override
public final Optional<R> fetchOptional() {
return Optional.ofNullable(fetchOne());
}
/* [/java-8] */
}

View File

@ -1154,9 +1154,9 @@ final class Utils {
/**
* Create a new array
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
static final <T> T[] array(T... array) {
return array;
}
@ -1165,9 +1165,9 @@ final class Utils {
* Use this rather than {@link Arrays#asList(Object...)} for
* <code>null</code>-safety
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
static final <T> List<T> list(T... array) {
return array == null ? Collections.<T>emptyList() : Arrays.asList(array);
}

View File

@ -463,11 +463,11 @@ public final class Convert {
}
}
/* [java-8] */
else if (toClass == Optional.class) {
return (U) Optional.empty();
}
/* [/java-8] */
else {
return null;
@ -504,11 +504,11 @@ public final class Convert {
}
}
/* [java-8] */
else if (toClass == Optional.class) {
return (U) Optional.of(from);
}
/* [/java-8] */
// All types can be converted into String
else if (toClass == String.class) {
@ -581,11 +581,11 @@ public final class Convert {
return (U) Long.valueOf(((java.util.Date) from).getTime());
}
/* [java-8] */
if (Temporal.class.isAssignableFrom(fromClass)) {
return (U) Long.valueOf(millis((Temporal) from));
}
/* [/java-8] */
try {
return (U) Long.valueOf(new BigDecimal(from.toString().trim()).longValue());
@ -653,11 +653,11 @@ public final class Convert {
return (U) ulong(((java.util.Date) from).getTime());
}
/* [java-8] */
if (Temporal.class.isAssignableFrom(fromClass)) {
return (U) ulong(millis((Temporal) from));
}
/* [/java-8] */
try {
return (U) ulong(new BigDecimal(from.toString().trim()).toBigInteger().toString());
@ -784,22 +784,22 @@ public final class Convert {
return toDate(((java.util.Date) from).getTime(), toClass);
}
/* [java-8] */
else if (Temporal.class.isAssignableFrom(fromClass)) {
return toDate(convert(from, Long.class), toClass);
}
/* [/java-8] */
// Long may also be converted into a date type
else if ((fromClass == Long.class || fromClass == long.class) && java.util.Date.class.isAssignableFrom(toClass)) {
return toDate((Long) from, toClass);
}
/* [java-8] */
else if ((fromClass == Long.class || fromClass == long.class) && Temporal.class.isAssignableFrom(toClass)) {
return toDate((Long) from, toClass);
}
/* [/java-8] */
// [#1501] Strings can be converted to java.sql.Date
else if ((fromClass == String.class) && toClass == java.sql.Date.class) {
@ -831,7 +831,7 @@ public final class Convert {
}
}
/* [java-8] */
else if ((fromClass == String.class) && toClass == LocalDate.class) {
// Try "lenient" ISO date formats first
@ -927,7 +927,7 @@ public final class Convert {
}
}
}
/* [/java-8] */
// [#1448] Some users may find it useful to convert string
// literals to Enum values without a Converter
@ -1041,7 +1041,7 @@ public final class Convert {
return (X) calendar;
}
/* [java-8] */
else if (toClass == LocalDate.class) {
return (X) new Date(time).toLocalDate();
}
@ -1060,12 +1060,12 @@ public final class Convert {
else if (toClass == Instant.class) {
return (X) new Timestamp(time).toLocalDateTime().atOffset(OffsetDateTime.now().getOffset()).toInstant();
}
/* [/java-8] */
throw fail(time, toClass);
}
/* [java-8] */
private static final long millis(Temporal temporal) {
// java.sql.* temporal types:
@ -1091,7 +1091,7 @@ public final class Convert {
throw fail(temporal, Long.class);
}
/* [/java-8] */
/**
* Some databases do not implement the standard very well. Specifically,

View File

@ -1033,9 +1033,9 @@ public final class StringUtils {
* @since 2.0
* @since 3.0 Changed signature to use varargs
*/
/* [java-8] */
@SafeVarargs
/* [/java-8] */
public static <T> String join(T... elements) {
return join(elements, null);
}

View File

@ -47,9 +47,9 @@ import org.jooq.Configuration;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface MockCallable<T> {
/**

View File

@ -60,9 +60,9 @@ import org.jooq.ResultQuery;
* @author Lukas Eder
* @see MockConnection
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface MockDataProvider {
/**

View File

@ -47,9 +47,9 @@ import org.jooq.Configuration;
*
* @author Lukas Eder
*/
/* [java-8] */
@FunctionalInterface
/* [/java-8] */
public interface MockRunnable {
/**