diff --git a/src/main/java/com/avaje/ebean/Model.java b/src/main/java/com/avaje/ebean/Model.java
index c10183402..a46a5093a 100644
--- a/src/main/java/com/avaje/ebean/Model.java
+++ b/src/main/java/com/avaje/ebean/Model.java
@@ -7,16 +7,19 @@ import java.util.Set;
import javax.persistence.MappedSuperclass;
/**
- * A MappedSuperclass base class that provides convenience methods for inserting, updating and deleting beans.
+ * A MappedSuperclass base class that provides convenience methods for inserting, updating and
+ * deleting beans.
*
- *
By having your entity beans extend this it provides a 'Active Record' style programming model for Ebean users.
+ *
+ * By having your entity beans extend this it provides a 'Active Record' style programming model for
+ * Ebean users.
*
- *
Note that there is a avaje-ebeanorm-mocker project that enables you to use Mockito or similar tools to still
- * mock out the underlying 'default EbeanServer' for testing purposes.
+ *
+ * Note that there is a avaje-ebeanorm-mocker project that enables you to use Mockito or similar
+ * tools to still mock out the underlying 'default EbeanServer' for testing purposes.
*/
@MappedSuperclass
public class Model {
-
private Object _getId() {
try {
@@ -31,21 +34,23 @@ public class Model {
/**
* Return the underlying 'default' EbeanServer.
*
- *
This provides full access to the API such as explicit transaction demarcation etc.
+ *
+ * This provides full access to the API such as explicit transaction demarcation etc.
*/
public EbeanServer db() {
return Ebean.getServer(null);
}
-
+
/**
* Return typically a different EbeanServer to the default.
*
- * @param server The name of the EbeanServer. If this is null then the default EbeanServer is returned.
+ * @param server
+ * The name of the EbeanServer. If this is null then the default EbeanServer is returned.
*/
public EbeanServer db(String server) {
return Ebean.getServer(server);
}
-
+
/**
* Inserts or update this entity depending on its state.
*/
@@ -74,7 +79,6 @@ public class Model {
Ebean.refresh(this);
}
-
@Override
public boolean equals(Object other) {
if (this == other)
@@ -108,7 +112,8 @@ public class Model {
/**
* Creates a finder for entity of type T with ID of type I.
*
- *
Typically you use this constructor to have a static "find" field on each entity bean.
+ *
+ * Typically you use this constructor to have a static "find" field on each entity bean.
*/
public Finder(Class idType, Class type) {
this(null, idType, type);
@@ -118,7 +123,8 @@ public class Model {
* Creates a finder for entity of type T with ID of type I, using a
* specific Ebean server.
*
- *
Typically you don't need to use this method.
+ *
+ * Typically you don't need to use this method.
*/
public Finder(String serverName, Class idType, Class type) {
this.type = type;
@@ -133,26 +139,29 @@ public class Model {
/**
* Return the underlying 'default' EbeanServer.
*
- *
This provides full access to the API such as explicit transaction demarcation etc.
+ *
+ * This provides full access to the API such as explicit transaction demarcation etc.
*/
public EbeanServer db() {
return Ebean.getServer(null);
}
-
+
/**
* Return typically a different EbeanServer to the default.
*
- * @param server The name of the EbeanServer. If this is null then the default EbeanServer is returned.
+ * @param server
+ * The name of the EbeanServer. If this is null then the default EbeanServer is
+ * returned.
*/
public EbeanServer db(String server) {
return Ebean.getServer(server);
}
-
+
/**
* Changes the Ebean server.
*/
public Finder on(String server) {
- return new Finder(server, idType, type);
+ return new Finder(server, idType, type);
}
/**
@@ -199,6 +208,101 @@ public class Model {
return (I) server().nextId(type);
}
+ /**
+ * Executes a find IDs query in a background thread.
+ *
+ * @deprecated RB: Hmm, this is a "find all" - less is more, prefer to hide this - just get from
+ * query().
+ */
+ public FutureIds findFutureIds() {
+ return query().findFutureIds();
+ }
+
+ /**
+ * Executes a query and returns the results as a list of IDs.
+ */
+ public List