From 1959e018445372165dd1d208bf53cb41a12026d9 Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Tue, 18 Feb 2020 23:43:39 +1300 Subject: [PATCH] Javadoc update only - change server to database in examples --- src/main/java/io/ebean/DB.java | 4 ++-- src/main/java/io/ebean/Database.java | 2 +- src/main/java/io/ebean/DatabaseFactory.java | 4 ++-- src/main/java/io/ebean/DocumentStore.java | 16 ++++++++-------- src/main/java/io/ebean/Ebean.java | 6 +++--- src/main/java/io/ebean/EbeanServerFactory.java | 4 ++-- src/main/java/io/ebean/PrimaryServer.java | 10 +++++----- src/main/java/io/ebean/QueryIterator.java | 2 +- src/main/java/io/ebean/Transaction.java | 4 ++-- .../java/io/ebean/config/DocStoreConfig.java | 4 ++-- src/main/java/io/ebean/config/ServerConfig.java | 8 ++++---- .../java/io/ebean/dbmigration/DbMigration.java | 4 ++-- .../io/ebean/event/BeanPersistController.java | 4 ++-- src/main/java/io/ebean/plugin/SpiServer.java | 2 +- .../java/io/ebean/search/TextCommonTerms.java | 2 +- .../java/io/ebean/search/TextQueryString.java | 4 ++-- src/main/java/io/ebean/search/TextSimple.java | 2 +- src/main/java/io/ebean/service/SpiContainer.java | 2 +- 18 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/main/java/io/ebean/DB.java b/src/main/java/io/ebean/DB.java index bcb46b3e9..9a260a521 100644 --- a/src/main/java/io/ebean/DB.java +++ b/src/main/java/io/ebean/DB.java @@ -86,14 +86,14 @@ public class DB { // /** // * Register the server with this Ebean singleton. Specify if the registered -// * server is the primary/default server. +// * server is the primary/default database. // */ // public static void register(EbeanServer server, boolean defaultServer) { // serverMgr.register(server, defaultServer); // } // // /** -// * Backdoor for registering a mock implementation of EbeanServer as the default server. +// * Backdoor for registering a mock implementation of EbeanServer as the default database. // */ // protected static EbeanServer mock(String name, EbeanServer server, boolean defaultServer) { // EbeanServer originalPrimaryServer = serverMgr.defaultServer; diff --git a/src/main/java/io/ebean/Database.java b/src/main/java/io/ebean/Database.java index 784f4804d..19795da7f 100644 --- a/src/main/java/io/ebean/Database.java +++ b/src/main/java/io/ebean/Database.java @@ -122,7 +122,7 @@ public interface Database { String getName(); /** - * Return the ExpressionFactory for this server. + * Return the ExpressionFactory for this database. */ ExpressionFactory getExpressionFactory(); diff --git a/src/main/java/io/ebean/DatabaseFactory.java b/src/main/java/io/ebean/DatabaseFactory.java index d050c7e24..bde3dfc10 100644 --- a/src/main/java/io/ebean/DatabaseFactory.java +++ b/src/main/java/io/ebean/DatabaseFactory.java @@ -34,14 +34,14 @@ public class DatabaseFactory { } /** - * Create using ebean.properties to configure the server. + * Create using ebean.properties to configure the database. */ public static synchronized Database create(String name) { return EbeanServerFactory.create(name); } /** - * Create using the ServerConfig object to configure the server. + * Create using the ServerConfig object to configure the database. */ public static synchronized Database create(DatabaseConfig config) { return EbeanServerFactory.create(config); diff --git a/src/main/java/io/ebean/DocumentStore.java b/src/main/java/io/ebean/DocumentStore.java index 1717bea47..2c5147027 100644 --- a/src/main/java/io/ebean/DocumentStore.java +++ b/src/main/java/io/ebean/DocumentStore.java @@ -61,7 +61,7 @@ public interface DocumentStore { *
{@code
    *
    * Customer customer =
-   *   server.find(Customer.class)
+   *   database.find(Customer.class)
    *     .setUseDocStore(true)
    *     .setId(42)
    *     .findOne();
@@ -79,7 +79,7 @@ public interface DocumentStore {
    * 
{@code
    *
    * List newCustomers =
-   *  server.find(Customer.class)
+   *  database.find(Customer.class)
    *    .setUseDocStore(true)
    *    .where().eq("status, Customer.Status.NEW)
    *    .findList();
@@ -99,7 +99,7 @@ public interface DocumentStore {
    * 
{@code
    *
    * PagedList newCustomers =
-   *  server.find(Customer.class)
+   *  database.find(Customer.class)
    *    .setUseDocStore(true)
    *    .where().eq("status, Customer.Status.NEW)
    *    .setMaxRows(50)
@@ -120,7 +120,7 @@ public interface DocumentStore {
    * 

*
{@code
    *
-   *  server.find(Order.class)
+   *  database.find(Order.class)
    *    .setUseDocStore(true)
    *    .where()... // perhaps add predicates
    *    .findEach((Order order) -> {
@@ -145,7 +145,7 @@ public interface DocumentStore {
    * 

*
{@code
    *
-   *  server.find(Order.class)
+   *  database.find(Order.class)
    *    .setUseDocStore(true)
    *    .where()... // perhaps add predicates
    *    .findEachWhile(new Predicate() {
@@ -190,7 +190,7 @@ public interface DocumentStore {
    * Drop the index from the document store (similar to DDL drop table).
    * 
{@code
    *
-   *   DocumentStore documentStore = server.docStore();
+   *   DocumentStore documentStore = database.docStore();
    *
    *   documentStore.dropIndex("product_copy");
    *
@@ -202,7 +202,7 @@ public interface DocumentStore {
    * Create an index given a mapping file as a resource in the classPath (similar to DDL create table).
    * 
{@code
    *
-   *   DocumentStore documentStore = server.docStore();
+   *   DocumentStore documentStore = database.docStore();
    *
    *   // uses product_copy.mapping.json resource
    *   // ... to define mappings for the index
@@ -289,7 +289,7 @@ public interface DocumentStore {
    * 
{@code
    *
    *  // predicates to select the source documents to copy
-   *  Query query = server.find(Product.class)
+   *  Query query = database.find(Product.class)
    *    .where()
    *      .ge("whenModified", new Timestamp(since))
    *      .ge("name", "A")
diff --git a/src/main/java/io/ebean/Ebean.java b/src/main/java/io/ebean/Ebean.java
index 814976a1d..8d40f0e18 100644
--- a/src/main/java/io/ebean/Ebean.java
+++ b/src/main/java/io/ebean/Ebean.java
@@ -187,7 +187,7 @@ public final class Ebean {
   }
 
   /**
-   * Return the ExpressionFactory from the default server.
+   * Return the ExpressionFactory from the default database.
    * 

* The ExpressionFactory is used internally by the query and ExpressionList to * build the WHERE and HAVING clauses. Alternatively you can use the @@ -209,14 +209,14 @@ public final class Ebean { /** * Register the server with this Ebean singleton. Specify if the registered - * server is the primary/default server. + * server is the primary/default database. */ public static void register(EbeanServer server, boolean defaultServer) { serverMgr.register(server, defaultServer); } /** - * Backdoor for registering a mock implementation of EbeanServer as the default server. + * Backdoor for registering a mock implementation of EbeanServer as the default database. */ protected static EbeanServer mock(String name, EbeanServer server, boolean defaultServer) { EbeanServer originalPrimaryServer = serverMgr.defaultServer; diff --git a/src/main/java/io/ebean/EbeanServerFactory.java b/src/main/java/io/ebean/EbeanServerFactory.java index 0880dd25f..72dfb4925 100644 --- a/src/main/java/io/ebean/EbeanServerFactory.java +++ b/src/main/java/io/ebean/EbeanServerFactory.java @@ -48,7 +48,7 @@ public class EbeanServerFactory { } /** - * Create using ebean.properties to configure the server. + * Create using ebean.properties to configure the database. */ public static synchronized EbeanServer create(String name) { @@ -59,7 +59,7 @@ public class EbeanServerFactory { } /** - * Create using the ServerConfig object to configure the server. + * Create using the ServerConfig object to configure the database. */ public static synchronized EbeanServer create(ServerConfig config) { diff --git a/src/main/java/io/ebean/PrimaryServer.java b/src/main/java/io/ebean/PrimaryServer.java index eb4204a1b..9b0140f6f 100644 --- a/src/main/java/io/ebean/PrimaryServer.java +++ b/src/main/java/io/ebean/PrimaryServer.java @@ -5,9 +5,9 @@ import io.ebean.config.properties.PropertiesLoader; import java.util.Properties; /** - * Provides singleton state for the default server. + * Provides singleton state for the default database. *

- * Intended for internal use as part of bootup, construction, registration of the default server. + * Intended for internal use as part of bootup, construction, registration of the default database. */ class PrimaryServer { @@ -18,21 +18,21 @@ class PrimaryServer { private static boolean skip; /** - * Set whether to skip automatically creating the primary server. + * Set whether to skip automatically creating the primary database. */ static synchronized void setSkip(boolean skip) { PrimaryServer.skip = skip; } /** - * Return true to skip automatically creating the primary server. + * Return true to skip automatically creating the primary database. */ static synchronized boolean isSkip() { return skip; } /** - * Return the default server name. + * Return the default database name. */ static synchronized String getDefaultServerName() { getProperties(); diff --git a/src/main/java/io/ebean/QueryIterator.java b/src/main/java/io/ebean/QueryIterator.java index f7a89223f..c4125a2ac 100644 --- a/src/main/java/io/ebean/QueryIterator.java +++ b/src/main/java/io/ebean/QueryIterator.java @@ -23,7 +23,7 @@ import java.util.Iterator; *

Try finally style

*
{@code
  *
- *  Query query = server.find(Customer.class)
+ *  Query query = database.find(Customer.class)
  *     .where().gt("id", 0)
  *     .orderBy("id")
  *     .setMaxRows(2);
diff --git a/src/main/java/io/ebean/Transaction.java b/src/main/java/io/ebean/Transaction.java
index a964aa6fd..9dd51c00d 100644
--- a/src/main/java/io/ebean/Transaction.java
+++ b/src/main/java/io/ebean/Transaction.java
@@ -295,7 +295,7 @@ public interface Transaction extends AutoCloseable {
    *
    * 
{@code
    *
-   * try (Transaction transaction = server.beginTransaction()) {
+   * try (Transaction transaction = database.beginTransaction()) {
    *
    *   // turn on JDBC batch
    *   transaction.setBatchMode(true);
@@ -318,7 +318,7 @@ public interface Transaction extends AutoCloseable {
    * 

*
{@code
    *
-   * try (Transaction transaction = server.beginTransaction()) {
+   * try (Transaction transaction = database.beginTransaction()) {
    *
    *   transaction.setBatchMode(true);
    *   transaction.setBatchSize(100);
diff --git a/src/main/java/io/ebean/config/DocStoreConfig.java b/src/main/java/io/ebean/config/DocStoreConfig.java
index 31405d3f8..d83f67749 100644
--- a/src/main/java/io/ebean/config/DocStoreConfig.java
+++ b/src/main/java/io/ebean/config/DocStoreConfig.java
@@ -29,7 +29,7 @@ public class DocStoreConfig {
   protected boolean create;
 
   /**
-   * The URL of the Document store server. For example: http://localhost:9200.
+   * The URL of the Document store. For example: http://localhost:9200.
    */
   protected String url;
 
@@ -131,7 +131,7 @@ public class DocStoreConfig {
   }
 
   /**
-   * Set the URL to the Document store server.
+   * Set the URL to the Document store.
    * 

* For a local ElasticSearch server this would be: http://localhost:9200 */ diff --git a/src/main/java/io/ebean/config/ServerConfig.java b/src/main/java/io/ebean/config/ServerConfig.java index cfeb0d3a2..3c11706ba 100644 --- a/src/main/java/io/ebean/config/ServerConfig.java +++ b/src/main/java/io/ebean/config/ServerConfig.java @@ -1886,7 +1886,7 @@ public class ServerConfig { } /** - * Return the database platform to use for this server. + * Return the database platform to use for this database. */ public DatabasePlatform getDatabasePlatform() { return databasePlatform; @@ -2282,7 +2282,7 @@ public class ServerConfig { *

* * @param cls the entity type (or other type) that should be registered by this - * server. + * database. */ public void addClass(Class cls) { classes.add(cls); @@ -2329,7 +2329,7 @@ public class ServerConfig { /** * Set the list of classes (entities, listeners, scalarTypes etc) that should - * be used for this server. + * be used for this database. *

* If no classes are specified then the classes are found automatically via * searching the class path. @@ -2343,7 +2343,7 @@ public class ServerConfig { } /** - * Return the classes registered for this server. Typically this includes + * Return the classes registered for this database. Typically this includes * entities and perhaps listeners. */ public List> getClasses() { diff --git a/src/main/java/io/ebean/dbmigration/DbMigration.java b/src/main/java/io/ebean/dbmigration/DbMigration.java index e9d12efe6..7bab8f7db 100644 --- a/src/main/java/io/ebean/dbmigration/DbMigration.java +++ b/src/main/java/io/ebean/dbmigration/DbMigration.java @@ -93,7 +93,7 @@ public interface DbMigration { /** * Set the specific platform to generate DDL for. *

- * If not set this defaults to the platform of the default server. + * If not set this defaults to the platform of the default database. *

*/ void setPlatform(Platform platform); @@ -101,7 +101,7 @@ public interface DbMigration { /** * Set the specific platform to generate DDL for. *

- * If not set this defaults to the platform of the default server. + * If not set this defaults to the platform of the default database. *

*/ void setPlatform(DatabasePlatform databasePlatform); diff --git a/src/main/java/io/ebean/event/BeanPersistController.java b/src/main/java/io/ebean/event/BeanPersistController.java index ed46dbdef..a546d0706 100644 --- a/src/main/java/io/ebean/event/BeanPersistController.java +++ b/src/main/java/io/ebean/event/BeanPersistController.java @@ -15,8 +15,8 @@ package io.ebean.event; * * Object extaBeanToSave = ...; * Transaction t = request.getTransaction(); - * EbeanServer server = request.getEbeanServer(); - * server.save(extraBeanToSave, t); + * Database server = request.getEbeanServer(); + * database.save(extraBeanToSave, t); * * }
*

diff --git a/src/main/java/io/ebean/plugin/SpiServer.java b/src/main/java/io/ebean/plugin/SpiServer.java index e672158d8..2b55077fb 100644 --- a/src/main/java/io/ebean/plugin/SpiServer.java +++ b/src/main/java/io/ebean/plugin/SpiServer.java @@ -20,7 +20,7 @@ public interface SpiServer extends EbeanServer, BeanLoader { ServerConfig getServerConfig(); /** - * Return the DatabasePlatform for this server. + * Return the DatabasePlatform for this database. */ DatabasePlatform getDatabasePlatform(); diff --git a/src/main/java/io/ebean/search/TextCommonTerms.java b/src/main/java/io/ebean/search/TextCommonTerms.java index cb0320bad..435e17a32 100644 --- a/src/main/java/io/ebean/search/TextCommonTerms.java +++ b/src/main/java/io/ebean/search/TextCommonTerms.java @@ -13,7 +13,7 @@ package io.ebean.search; * .lowFreqOperatorAnd(true) * .highFreqOperatorAnd(true); * - * List customers = server.find(Customer.class) + * List customers = database.find(Customer.class) * .text() * .textCommonTerms("the brown", options) * .findList(); diff --git a/src/main/java/io/ebean/search/TextQueryString.java b/src/main/java/io/ebean/search/TextQueryString.java index cb8b27508..7e70732e0 100644 --- a/src/main/java/io/ebean/search/TextQueryString.java +++ b/src/main/java/io/ebean/search/TextQueryString.java @@ -13,7 +13,7 @@ package io.ebean.search; * .lenient(true) * .opAnd(); * - * List customers = server.find(Customer.class) + * List customers = database.find(Customer.class) * .text() * .textSimple("quick brown", options) * .findList(); @@ -24,7 +24,7 @@ package io.ebean.search; * // just use default options * TextQueryString options = new TextQueryString(); * - * List customers = server.find(Customer.class) + * List customers = database.find(Customer.class) * .text() * .textSimple("quick brown", options) * .findList(); diff --git a/src/main/java/io/ebean/search/TextSimple.java b/src/main/java/io/ebean/search/TextSimple.java index 197acd4ed..97dca17ae 100644 --- a/src/main/java/io/ebean/search/TextSimple.java +++ b/src/main/java/io/ebean/search/TextSimple.java @@ -13,7 +13,7 @@ package io.ebean.search; * .lenient(true) * .opAnd(); * - * List customers = server.find(Customer.class) + * List customers = database.find(Customer.class) * .text() * .textSimple("quick brown", options) * .findList(); diff --git a/src/main/java/io/ebean/service/SpiContainer.java b/src/main/java/io/ebean/service/SpiContainer.java index d317ed4b8..bf4aa4aca 100644 --- a/src/main/java/io/ebean/service/SpiContainer.java +++ b/src/main/java/io/ebean/service/SpiContainer.java @@ -12,7 +12,7 @@ public interface SpiContainer { /** * Create the EbeanServer for a given configuration. * - * @param configuration The configuration information for this server. + * @param configuration The configuration information for this database. */ EbeanServer createServer(ServerConfig configuration);