filterMany(String prop);
/**
diff --git a/src/main/java/io/ebean/Finder.java b/src/main/java/io/ebean/Finder.java
index 618e90ef2..bcba9667a 100644
--- a/src/main/java/io/ebean/Finder.java
+++ b/src/main/java/io/ebean/Finder.java
@@ -1,6 +1,7 @@
package io.ebean;
-import org.jetbrains.annotations.Nullable;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import java.util.List;
@@ -132,6 +133,7 @@ public class Finder {
*
* Equivalent to {@link EbeanServer#getReference(Class, Object)}
*/
+ @Nonnull
public T ref(I id) {
return db().getReference(type, id);
}
@@ -158,6 +160,7 @@ public class Finder {
/**
* Retrieves all entities of the given type.
*/
+ @Nonnull
public List all() {
return query().findList();
}
diff --git a/src/main/java/io/ebean/PagedList.java b/src/main/java/io/ebean/PagedList.java
index be820cb06..421fde776 100644
--- a/src/main/java/io/ebean/PagedList.java
+++ b/src/main/java/io/ebean/PagedList.java
@@ -1,5 +1,6 @@
package io.ebean;
+import javax.annotation.Nonnull;
import java.util.List;
import java.util.concurrent.Future;
@@ -109,11 +110,13 @@ public interface PagedList {
*
* }
*/
+ @Nonnull
Future getFutureCount();
/**
* Return the list of entities for this page.
*/
+ @Nonnull
List getList();
/**
diff --git a/src/main/java/io/ebean/Query.java b/src/main/java/io/ebean/Query.java
index b69bc778e..4d97bf7d9 100644
--- a/src/main/java/io/ebean/Query.java
+++ b/src/main/java/io/ebean/Query.java
@@ -1,7 +1,7 @@
package io.ebean;
-import org.jetbrains.annotations.Nullable;
-
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.persistence.NonUniqueResultException;
import java.sql.Timestamp;
import java.util.List;
@@ -597,6 +597,7 @@ public interface Query {
*
* @see EbeanServer#findIds(Query, Transaction)
*/
+ @Nonnull
List findIds();
/**
@@ -637,6 +638,7 @@ public interface Query {
*
* }
*/
+ @Nonnull
QueryIterator findIterate();
/**
@@ -735,6 +737,7 @@ public interface Query {
*
* @see EbeanServer#findList(Query, Transaction)
*/
+ @Nonnull
List findList();
/**
@@ -753,6 +756,7 @@ public interface Query {
*
* @see EbeanServer#findSet(Query, Transaction)
*/
+ @Nonnull
Set findSet();
/**
@@ -775,6 +779,7 @@ public interface Query {
*
* @see EbeanServer#findMap(Query, Transaction)
*/
+ @Nonnull
Map findMap();
/**
@@ -807,6 +812,7 @@ public interface Query {
*
* @return the list of values for the selected property
*/
+ @Nonnull
List findSingleAttributeList();
/**
@@ -855,6 +861,7 @@ public interface Query {
/**
* Execute the query returning an optional bean.
*/
+ @Nonnull
Optional findOneOrEmpty();
/**
@@ -882,6 +889,7 @@ public interface Query {
* It will execute the query against the history returning the versions of the bean.
*
*/
+ @Nonnull
List> findVersions();
/**
@@ -891,6 +899,7 @@ public interface Query {
* It will execute the query against the history returning the versions of the bean.
*
*/
+ @Nonnull
List> findVersionsBetween(Timestamp start, Timestamp end);
/**
@@ -928,6 +937,7 @@ public interface Query {
*
* @return a Future object for the row count query
*/
+ @Nonnull
FutureRowCount findFutureCount();
/**
@@ -940,6 +950,7 @@ public interface Query {
*
* @return a Future object for the list of Id's
*/
+ @Nonnull
FutureIds findFutureIds();
/**
@@ -951,6 +962,7 @@ public interface Query {
*
* @return a Future object for the list result of the query
*/
+ @Nonnull
FutureList findFutureList();
/**
@@ -980,6 +992,7 @@ public interface Query {
*
* @return The PagedList
*/
+ @Nonnull
PagedList findPagedList();
/**
diff --git a/src/main/java/io/ebean/SqlQuery.java b/src/main/java/io/ebean/SqlQuery.java
index 3c568bd0a..d59e14b9d 100644
--- a/src/main/java/io/ebean/SqlQuery.java
+++ b/src/main/java/io/ebean/SqlQuery.java
@@ -1,5 +1,7 @@
package io.ebean;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
@@ -43,6 +45,7 @@ public interface SqlQuery extends Serializable {
/**
* Execute the query returning a list.
*/
+ @Nonnull
List findList();
/**
@@ -71,16 +74,19 @@ public interface SqlQuery extends Serializable {
* PersistenceException.
*
*/
+ @Nullable
SqlRow findOne();
/**
* Execute the query returning an optional row.
*/
+ @Nonnull
Optional findOneOrEmpty();
/**
* Deprecated - please migrate to findOne().
*/
+ @Nullable
@Deprecated
default SqlRow findUnique() {
return findOne();