From cc64ff5f105b0453baafd2a74ffdfe917068487a Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Sun, 14 Feb 2021 11:37:19 +1300 Subject: [PATCH] Update javadoc with use of FetchConfig.ofQuery() etc --- ebean-api/src/main/java/io/ebean/Query.java | 14 +++++++------- ebean-api/src/main/java/io/ebean/RawSql.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ebean-api/src/main/java/io/ebean/Query.java b/ebean-api/src/main/java/io/ebean/Query.java index 7a33e66f4..24a8445be 100644 --- a/ebean-api/src/main/java/io/ebean/Query.java +++ b/ebean-api/src/main/java/io/ebean/Query.java @@ -514,7 +514,7 @@ public interface Query { *

*
{@code
    *
-   *  fetch(path, fetchProperties, new FetchConfig().query())
+   *  fetch(path, fetchProperties, FetchConfig.ofQuery())
    *
    * }
*

@@ -548,7 +548,7 @@ public interface Query { *

*
{@code
    *
-   *  fetch(path, fetchProperties, new FetchConfig().lazy())
+   *  fetch(path, fetchProperties, FetchConfig.ofLazy())
    *
    * }
*

@@ -573,7 +573,7 @@ public interface Query { * // fetch customers (their id, name and status) * List customers = DB.find(Customer.class) * .select("name, status") - * .fetch("contacts", "firstName,lastName,email", new FetchConfig().lazy(10)) + * .fetch("contacts", "firstName,lastName,email", FetchConfig.ofLazy(10)) * .findList(); * * } @@ -610,7 +610,7 @@ public interface Query { *

*
{@code
    *
-   *  fetch(path, new FetchConfig().query())
+   *  fetch(path, FetchConfig.ofQuery())
    *
    * }
*

@@ -639,7 +639,7 @@ public interface Query { *

*
{@code
    *
-   *  fetch(path, new FetchConfig().lazy())
+   *  fetch(path, FetchConfig.ofLazy())
    *
    * }
*

@@ -662,7 +662,7 @@ public interface Query { * // fetch customers (their id, name and status) * List customers = DB.find(Customer.class) * // lazy fetch contacts with a batch size of 100 - * .fetch("contacts", new FetchConfig().lazy(100)) + * .fetch("contacts", FetchConfig.ofLazy(100)) * .findList(); * * } @@ -844,7 +844,7 @@ public interface Query { *

{@code
    *
    *  DB.find(Customer.class)
-   *     .fetch("contacts", new FetchConfig().query(2))
+   *     .fetch("contacts", FetchConfig.ofQuery(2))
    *     .where().eq("status", Status.NEW)
    *     .order().asc("id")
    *     .setMaxRows(2000)
diff --git a/ebean-api/src/main/java/io/ebean/RawSql.java b/ebean-api/src/main/java/io/ebean/RawSql.java
index 1fe274a1e..e0e20714b 100644
--- a/ebean-api/src/main/java/io/ebean/RawSql.java
+++ b/ebean-api/src/main/java/io/ebean/RawSql.java
@@ -107,7 +107,7 @@ package io.ebean;
  *
  *   List orders = DB.find(OrderAggregate.class)
  *     .setRawSql(rawSql)
- *     .fetch("order", "status,orderDate", new FetchConfig().query())
+ *     .fetch("order", "status,orderDate", FetchConfig.ofQuery())
  *     .fetch("order.customer", "name")
  *     .where().gt("order.id", 0)
  *     .having().gt("totalAmount", 20)