From a1d3d20d0c54eb87d6e90d1556c2ca4950baa9f7 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 14 Jul 2020 16:19:37 +0200 Subject: [PATCH] [jOOQ/jOOQ#10386] Updated Javadoc to refer to new Settings --- jOOQ/src/main/java/org/jooq/TableRecord.java | 4 +++- jOOQ/src/main/java/org/jooq/UpdatableRecord.java | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/TableRecord.java b/jOOQ/src/main/java/org/jooq/TableRecord.java index e4b612f12c..0e3ddc5ec8 100644 --- a/jOOQ/src/main/java/org/jooq/TableRecord.java +++ b/jOOQ/src/main/java/org/jooq/TableRecord.java @@ -39,6 +39,7 @@ package org.jooq; import java.util.Collection; +import org.jooq.conf.Settings; import org.jooq.exception.DataAccessException; import org.jetbrains.annotations.NotNull; @@ -69,7 +70,8 @@ public interface TableRecord> extends Record { * If you want to enforce statement execution, regardless if the values in * this record were changed, you can explicitly set the changed flags for * all values with {@link #changed(boolean)} or for single values with - * {@link #changed(Field, boolean)}, prior to insertion. + * {@link #changed(Field, boolean)}, prior to insertion, or alternatively, + * use {@link Settings#isInsertUnchangedRecords()}. * * @return 1 if the record was stored to the database. 0 * if storing was not necessary. diff --git a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java index 7a4edd7cff..b9c789ac0e 100644 --- a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java +++ b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java @@ -88,6 +88,8 @@ import org.jetbrains.annotations.Nullable; * the first time) *
  • {@link #store()} : Storing the record to the database. This executes * either an INSERT or an UPDATE statement
  • + *
  • {@link #merge()} : Merging a record to the database. This executes an + * INSERT .. ON DUPLICATE KEY UPDATE statement.
  • * *

    * UpdatableRecords are {@link Attachable}, which means that they @@ -227,7 +229,9 @@ public interface UpdatableRecord> extends TableReco * If you want to enforce statement execution, regardless if the values in * this record were changed, you can explicitly set the changed flags for * all values with {@link #changed(boolean)} or for single values with - * {@link #changed(Field, boolean)}, prior to storing. + * {@link #changed(Field, boolean)}, prior to storing, or alternatively, use + * {@link Settings#getUpdateUnchangedRecords()} and/or + * {@link Settings#isInsertUnchangedRecords()}. *

    * This is the same as calling record.store(record.fields()) * @@ -282,7 +286,8 @@ public interface UpdatableRecord> extends TableReco * If you want to enforce statement execution, regardless if the values in * this record were changed, you can explicitly set the changed flags for * all values with {@link #changed(boolean)} or for single values with - * {@link #changed(Field, boolean)}, prior to insertion. + * {@link #changed(Field, boolean)}, prior to insertion, or alternatively, + * use {@link Settings#isInsertUnchangedRecords()}. *

    * This is the same as calling record.insert(record.fields()) * @@ -331,7 +336,8 @@ public interface UpdatableRecord> extends TableReco * If you want to enforce statement execution, regardless if the values in * this record were changed, you can explicitly set the changed flags for * all values with {@link #changed(boolean)} or for single values with - * {@link #changed(Field, boolean)}, prior to updating. + * {@link #changed(Field, boolean)}, prior to updating, or alternatively, + * use {@link Settings#getUpdateUnchangedRecords()}. *

    * This is the same as calling record.update(record.fields()) * @@ -391,7 +397,9 @@ public interface UpdatableRecord> extends TableReco * If you want to enforce statement execution, regardless if the values in * this record were changed, you can explicitly set the changed flags for * all values with {@link #changed(boolean)} or for single values with - * {@link #changed(Field, boolean)}, prior to insertion. + * {@link #changed(Field, boolean)}, prior to insertion, or alternatively, + * use {@link Settings#getUpdateUnchangedRecords()} and/or + * {@link Settings#isInsertUnchangedRecords()}.. *

    * This is the same as calling record.merge(record.fields()) *