From c371d81eec59e476aa53704a4c1a2d58d7798edd Mon Sep 17 00:00:00 2001 From: lukaseder Date: Tue, 5 Sep 2017 18:10:21 +0200 Subject: [PATCH] [#6561] Manual section about optimistic locking has invalid code --- .../src/main/resources/org/jooq/web/manual-2.5.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-2.6.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.0.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.1.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.10.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.2.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.3.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.4.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.5.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.6.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.7.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.8.xml | 8 ++++---- .../src/main/resources/org/jooq/web/manual-3.9.xml | 8 ++++---- 13 files changed, 52 insertions(+), 52 deletions(-) diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.5.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.5.xml index bd9081b293..31097b3d62 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.5.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.5.xml @@ -6577,8 +6577,8 @@ Factory optimistic = new Factory(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -6610,8 +6610,8 @@ Factory optimistic = new Factory(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.6.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.6.xml index f131361df6..580b87213e 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.6.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-2.6.xml @@ -7141,8 +7141,8 @@ Factory optimistic = new Factory(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -7174,8 +7174,8 @@ Factory optimistic = new Factory(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml index 24c6479fdd..91ec011d90 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml @@ -8558,8 +8558,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -8591,8 +8591,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml index 40f0e42367..b2ae3ea68f 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml @@ -9087,8 +9087,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -9120,8 +9120,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml index e5e8deee13..0925882dad 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml @@ -13033,8 +13033,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -13066,8 +13066,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml index a9bd4edfe0..bb61a4e88a 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml @@ -9426,8 +9426,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -9459,8 +9459,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml index 1b0a682c13..444b4a2d0f 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml @@ -10259,8 +10259,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -10292,8 +10292,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml index f91be57220..50d428ff51 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml @@ -11228,8 +11228,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -11261,8 +11261,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml index a6ba11fc65..9ef5cef532 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml @@ -11662,8 +11662,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -11695,8 +11695,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml index 642ff55fb8..02c6ca7f77 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml @@ -12062,8 +12062,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -12095,8 +12095,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml index f034936284..a1f3664215 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml @@ -12465,8 +12465,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -12498,8 +12498,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml index 20919bec8e..d9681281a0 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml @@ -12689,8 +12689,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -12722,8 +12722,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml index 570a04cb27..c3a3316181 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml @@ -12854,8 +12854,8 @@ DSLContext optimistic = DSLContext.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The underlying database record has not been modified, it can be safely updated. book1.setTitle("Animal Farm"); @@ -12887,8 +12887,8 @@ DSLContext optimistic = DSL.using(connection, SQLDialect.ORACLE, new Settings().withExecuteWithOptimisticLocking(true)); // Fetch a book two times -BookRecord book1 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); -BookRecord book2 = optimistic.fetch(BOOK, BOOK.ID.eq(5)); +BookRecord book1 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); +BookRecord book2 = optimistic.fetchOne(BOOK, BOOK.ID.eq(5)); // Change the title and store this book. The MODIFIED value has not been changed since the book was fetched. // It can be safely updated