diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java b/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java index 2e486554de..63729dd6da 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java @@ -701,7 +701,7 @@ public class DefaultRecordMapper implements RecordMapper implements Callable { private final Constructor constructor; ConstructorCall(Constructor constructor) { this.constructor = constructor; } public Constructor constructor() { return constructor; } @Override public boolean equals(Object o) { if (!(o instanceof ConstructorCall)) return false; ConstructorCall other = (ConstructorCall) o; if (!java.util.Objects.equals(this.constructor, other.constructor)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.constructor); } @Override public String toString() { return new StringBuilder("ConstructorCall[").append("constructor=").append(this.constructor).append("]").toString(); } + private static final /* record */ class ConstructorCall implements Callable { private final Constructor constructor; public ConstructorCall(Constructor constructor) { this.constructor = constructor; } public Constructor constructor() { return constructor; } @Override public boolean equals(Object o) { if (!(o instanceof ConstructorCall)) return false; ConstructorCall other = (ConstructorCall) o; if (!java.util.Objects.equals(this.constructor, other.constructor)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.constructor); } @Override public String toString() { return new StringBuilder("ConstructorCall[").append("constructor=").append(this.constructor).append("]").toString(); } @Override public E call() throws Exception { return constructor.newInstance(); diff --git a/jOOQ/src/main/java/org/jooq/impl/Diff.java b/jOOQ/src/main/java/org/jooq/impl/Diff.java index 76c2ad67a4..17e71d7801 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Diff.java +++ b/jOOQ/src/main/java/org/jooq/impl/Diff.java @@ -718,7 +718,7 @@ final class Diff { return result.iterator(); } - private static final /* record */ class DiffResult { private final List queries; private final Set> droppedFks; DiffResult(List queries, Set> droppedFks) { this.queries = queries; this.droppedFks = droppedFks; } public List queries() { return queries; } public Set> droppedFks() { return droppedFks; } @Override public boolean equals(Object o) { if (!(o instanceof DiffResult)) return false; DiffResult other = (DiffResult) o; if (!java.util.Objects.equals(this.queries, other.queries)) return false; if (!java.util.Objects.equals(this.droppedFks, other.droppedFks)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.queries, this.droppedFks); } + private static final /* record */ class DiffResult { private final List queries; private final Set> droppedFks; public DiffResult(List queries, Set> droppedFks) { this.queries = queries; this.droppedFks = droppedFks; } public List queries() { return queries; } public Set> droppedFks() { return droppedFks; } @Override public boolean equals(Object o) { if (!(o instanceof DiffResult)) return false; DiffResult other = (DiffResult) o; if (!java.util.Objects.equals(this.queries, other.queries)) return false; if (!java.util.Objects.equals(this.droppedFks, other.droppedFks)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.queries, this.droppedFks); } DiffResult() { this(new ArrayList<>(), new HashSet<>()); } diff --git a/jOOQ/src/main/java/org/jooq/impl/ExplainQuery.java b/jOOQ/src/main/java/org/jooq/impl/ExplainQuery.java index c1243e77b4..2418b4803b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ExplainQuery.java +++ b/jOOQ/src/main/java/org/jooq/impl/ExplainQuery.java @@ -147,7 +147,7 @@ final class ExplainQuery { return new ExplainImpl(rows, cost, result.format()); } - private static final /* record */ class ExplainImpl implements Explain { private final double rows; private final double cost; private final String plan; ExplainImpl(double rows, double cost, String plan) { this.rows = rows; this.cost = cost; this.plan = plan; } public double rows() { return rows; } public double cost() { return cost; } public String plan() { return plan; } @Override public boolean equals(Object o) { if (!(o instanceof ExplainImpl)) return false; ExplainImpl other = (ExplainImpl) o; if (!java.util.Objects.equals(this.rows, other.rows)) return false; if (!java.util.Objects.equals(this.cost, other.cost)) return false; if (!java.util.Objects.equals(this.plan, other.plan)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.rows, this.cost, this.plan); } + private static final /* record */ class ExplainImpl implements Explain { private final double rows; private final double cost; private final String plan; public ExplainImpl(double rows, double cost, String plan) { this.rows = rows; this.cost = cost; this.plan = plan; } public double rows() { return rows; } public double cost() { return cost; } public String plan() { return plan; } @Override public boolean equals(Object o) { if (!(o instanceof ExplainImpl)) return false; ExplainImpl other = (ExplainImpl) o; if (!java.util.Objects.equals(this.rows, other.rows)) return false; if (!java.util.Objects.equals(this.cost, other.cost)) return false; if (!java.util.Objects.equals(this.plan, other.plan)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.rows, this.cost, this.plan); } @Override public String toString() { diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 571c572ab9..67757f0c28 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -4103,7 +4103,7 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { return storageStep; } - private static final /* record */ class ParseInlineConstraints { private final DataType type; private final Comment fieldComment; private final boolean primary; private final boolean identity; ParseInlineConstraints(DataType type, Comment fieldComment, boolean primary, boolean identity) { this.type = type; this.fieldComment = fieldComment; this.primary = primary; this.identity = identity; } public DataType type() { return type; } public Comment fieldComment() { return fieldComment; } public boolean primary() { return primary; } public boolean identity() { return identity; } @Override public boolean equals(Object o) { if (!(o instanceof ParseInlineConstraints)) return false; ParseInlineConstraints other = (ParseInlineConstraints) o; if (!java.util.Objects.equals(this.type, other.type)) return false; if (!java.util.Objects.equals(this.fieldComment, other.fieldComment)) return false; if (!java.util.Objects.equals(this.primary, other.primary)) return false; if (!java.util.Objects.equals(this.identity, other.identity)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.type, this.fieldComment, this.primary, this.identity); } @Override public String toString() { return new StringBuilder("ParseInlineConstraints[").append("type=").append(this.type).append(", fieldComment=").append(this.fieldComment).append(", primary=").append(this.primary).append(", identity=").append(this.identity).append("]").toString(); } } + private static final /* record */ class ParseInlineConstraints { private final DataType type; private final Comment fieldComment; private final boolean primary; private final boolean identity; public ParseInlineConstraints(DataType type, Comment fieldComment, boolean primary, boolean identity) { this.type = type; this.fieldComment = fieldComment; this.primary = primary; this.identity = identity; } public DataType type() { return type; } public Comment fieldComment() { return fieldComment; } public boolean primary() { return primary; } public boolean identity() { return identity; } @Override public boolean equals(Object o) { if (!(o instanceof ParseInlineConstraints)) return false; ParseInlineConstraints other = (ParseInlineConstraints) o; if (!java.util.Objects.equals(this.type, other.type)) return false; if (!java.util.Objects.equals(this.fieldComment, other.fieldComment)) return false; if (!java.util.Objects.equals(this.primary, other.primary)) return false; if (!java.util.Objects.equals(this.identity, other.identity)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.type, this.fieldComment, this.primary, this.identity); } @Override public String toString() { return new StringBuilder("ParseInlineConstraints[").append("type=").append(this.type).append(", fieldComment=").append(this.fieldComment).append(", primary=").append(this.primary).append(", identity=").append(this.identity).append("]").toString(); } } private final ParseInlineConstraints parseInlineConstraints( Name fieldName, diff --git a/jOOQ/src/main/java/org/jooq/impl/R2DBC.java b/jOOQ/src/main/java/org/jooq/impl/R2DBC.java index cd0ce2c9d4..43701449cf 100644 --- a/jOOQ/src/main/java/org/jooq/impl/R2DBC.java +++ b/jOOQ/src/main/java/org/jooq/impl/R2DBC.java @@ -1052,7 +1052,7 @@ final class R2DBC { return new MockArray<>(c.dialect(), (Object[]) nullable(columnIndex, Object.class), Object[].class); } - private static final /* record */ class DefaultRow implements Row { private final Configuration c; private final Row r; DefaultRow(Configuration c, Row r) { this.c = c; this.r = r; } public Configuration c() { return c; } public Row r() { return r; } @Override public boolean equals(Object o) { if (!(o instanceof DefaultRow)) return false; DefaultRow other = (DefaultRow) o; if (!java.util.Objects.equals(this.c, other.c)) return false; if (!java.util.Objects.equals(this.r, other.r)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.c, this.r); } @Override public String toString() { return new StringBuilder("DefaultRow[").append("c=").append(this.c).append(", r=").append(this.r).append("]").toString(); } + private static final /* record */ class DefaultRow implements Row { private final Configuration c; private final Row r; public DefaultRow(Configuration c, Row r) { this.c = c; this.r = r; } public Configuration c() { return c; } public Row r() { return r; } @Override public boolean equals(Object o) { if (!(o instanceof DefaultRow)) return false; DefaultRow other = (DefaultRow) o; if (!java.util.Objects.equals(this.c, other.c)) return false; if (!java.util.Objects.equals(this.r, other.r)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.c, this.r); } @Override public String toString() { return new StringBuilder("DefaultRow[").append("c=").append(this.c).append(", r=").append(this.r).append("]").toString(); } // These methods are proxied for some drivers that can't convert // between data types. See: @@ -1097,7 +1097,7 @@ final class R2DBC { } } - static final /* record */ class R2DBCResultSetMetaData implements ResultSetMetaData { private final Configuration c; private final RowMetadata m; R2DBCResultSetMetaData(Configuration c, RowMetadata m) { this.c = c; this.m = m; } public Configuration c() { return c; } public RowMetadata m() { return m; } @Override public boolean equals(Object o) { if (!(o instanceof R2DBCResultSetMetaData)) return false; R2DBCResultSetMetaData other = (R2DBCResultSetMetaData) o; if (!java.util.Objects.equals(this.c, other.c)) return false; if (!java.util.Objects.equals(this.m, other.m)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.c, this.m); } @Override public String toString() { return new StringBuilder("R2DBCResultSetMetaData[").append("c=").append(this.c).append(", m=").append(this.m).append("]").toString(); } + static final /* record */ class R2DBCResultSetMetaData implements ResultSetMetaData { private final Configuration c; private final RowMetadata m; public R2DBCResultSetMetaData(Configuration c, RowMetadata m) { this.c = c; this.m = m; } public Configuration c() { return c; } public RowMetadata m() { return m; } @Override public boolean equals(Object o) { if (!(o instanceof R2DBCResultSetMetaData)) return false; R2DBCResultSetMetaData other = (R2DBCResultSetMetaData) o; if (!java.util.Objects.equals(this.c, other.c)) return false; if (!java.util.Objects.equals(this.m, other.m)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.c, this.m); } @Override public String toString() { return new StringBuilder("R2DBCResultSetMetaData[").append("c=").append(this.c).append(", m=").append(this.m).append("]").toString(); } private final ColumnMetadata meta(int column) { return m.getColumnMetadata(column - 1); diff --git a/jOOQ/src/main/java/org/jooq/impl/ResultsImpl.java b/jOOQ/src/main/java/org/jooq/impl/ResultsImpl.java index 6845bc6963..db53d4870b 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ResultsImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ResultsImpl.java @@ -193,7 +193,7 @@ final class ResultsImpl extends AbstractList> implements Results return translated; } - static final /* record */ class ResultOrRowsImpl implements ResultOrRows { private final Result result; private final int rows; private final DataAccessException exception; ResultOrRowsImpl(Result result, int rows, DataAccessException exception) { this.result = result; this.rows = rows; this.exception = exception; } public Result result() { return result; } public int rows() { return rows; } public DataAccessException exception() { return exception; } @Override public boolean equals(Object o) { if (!(o instanceof ResultOrRowsImpl)) return false; ResultOrRowsImpl other = (ResultOrRowsImpl) o; if (!java.util.Objects.equals(this.result, other.result)) return false; if (!java.util.Objects.equals(this.rows, other.rows)) return false; if (!java.util.Objects.equals(this.exception, other.exception)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.result, this.rows, this.exception); } + static final /* record */ class ResultOrRowsImpl implements ResultOrRows { private final Result result; private final int rows; private final DataAccessException exception; public ResultOrRowsImpl(Result result, int rows, DataAccessException exception) { this.result = result; this.rows = rows; this.exception = exception; } public Result result() { return result; } public int rows() { return rows; } public DataAccessException exception() { return exception; } @Override public boolean equals(Object o) { if (!(o instanceof ResultOrRowsImpl)) return false; ResultOrRowsImpl other = (ResultOrRowsImpl) o; if (!java.util.Objects.equals(this.result, other.result)) return false; if (!java.util.Objects.equals(this.rows, other.rows)) return false; if (!java.util.Objects.equals(this.exception, other.exception)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.result, this.rows, this.exception); } ResultOrRowsImpl(Result result) { this(result, result != null ? result.size() : 0, null); } diff --git a/jOOQ/src/main/java/org/jooq/impl/ScopeStack.java b/jOOQ/src/main/java/org/jooq/impl/ScopeStack.java index 1f4db7eee8..e30932617e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ScopeStack.java +++ b/jOOQ/src/main/java/org/jooq/impl/ScopeStack.java @@ -110,7 +110,7 @@ final class ScopeStack implements Iterable { return () -> new ScopeStackIterator<>(list -> list.get(list.size() - 1), filter); } - static final /* record */ class Value { private final int scopeLevel; private final V value; Value(int scopeLevel, V value) { this.scopeLevel = scopeLevel; this.value = value; } public int scopeLevel() { return scopeLevel; } public V value() { return value; } @Override public boolean equals(Object o) { if (!(o instanceof Value)) return false; Value other = (Value) o; if (!java.util.Objects.equals(this.scopeLevel, other.scopeLevel)) return false; if (!java.util.Objects.equals(this.value, other.value)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.scopeLevel, this.value); } @Override public String toString() { return new StringBuilder("Value[").append("scopeLevel=").append(this.scopeLevel).append(", value=").append(this.value).append("]").toString(); } + static final /* record */ class Value { private final int scopeLevel; private final V value; public Value(int scopeLevel, V value) { this.scopeLevel = scopeLevel; this.value = value; } public int scopeLevel() { return scopeLevel; } public V value() { return value; } @Override public boolean equals(Object o) { if (!(o instanceof Value)) return false; Value other = (Value) o; if (!java.util.Objects.equals(this.scopeLevel, other.scopeLevel)) return false; if (!java.util.Objects.equals(this.value, other.value)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.scopeLevel, this.value); } @Override public String toString() { return new StringBuilder("Value[").append("scopeLevel=").append(this.scopeLevel).append(", value=").append(this.value).append("]").toString(); } static Value of(int scopeLevel, V value) { return value == null ? null : new Value<>(scopeLevel, value); } diff --git a/jOOQ/src/main/java/org/jooq/impl/VersionImpl.java b/jOOQ/src/main/java/org/jooq/impl/VersionImpl.java index ed951ada9f..56cdea59c4 100644 --- a/jOOQ/src/main/java/org/jooq/impl/VersionImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/VersionImpl.java @@ -271,7 +271,7 @@ final class VersionImpl extends AbstractNode implements Version { return "-- Version: " + id() + "\n" + meta(); } - private static final /* record */ class Parent { private final VersionImpl version; private final Queries queries; Parent(VersionImpl version, Queries queries) { this.version = version; this.queries = queries; } public VersionImpl version() { return version; } public Queries queries() { return queries; } @Override public boolean equals(Object o) { if (!(o instanceof Parent)) return false; Parent other = (Parent) o; if (!java.util.Objects.equals(this.version, other.version)) return false; if (!java.util.Objects.equals(this.queries, other.queries)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.version, this.queries); } + private static final /* record */ class Parent { private final VersionImpl version; private final Queries queries; public Parent(VersionImpl version, Queries queries) { this.version = version; this.queries = queries; } public VersionImpl version() { return version; } public Queries queries() { return queries; } @Override public boolean equals(Object o) { if (!(o instanceof Parent)) return false; Parent other = (Parent) o; if (!java.util.Objects.equals(this.version, other.version)) return false; if (!java.util.Objects.equals(this.queries, other.queries)) return false; return true; } @Override public int hashCode() { return java.util.Objects.hash(this.version, this.queries); } @Override public String toString() { return version.toString();