findList(SqlQuery query, Transaction transaction);
/**
diff --git a/ebean-api/src/main/java/io/ebean/FetchGroup.java b/ebean-api/src/main/java/io/ebean/FetchGroup.java
index 95ea70412..5eb749048 100644
--- a/ebean-api/src/main/java/io/ebean/FetchGroup.java
+++ b/ebean-api/src/main/java/io/ebean/FetchGroup.java
@@ -2,8 +2,6 @@ package io.ebean;
import io.ebean.service.SpiFetchGroupQuery;
-import javax.annotation.Nonnull;
-
/**
* Defines what part of the object graph to load (select and fetch clauses).
*
@@ -83,7 +81,6 @@ public interface FetchGroup {
*
* @return The FetchGroup with the given select clause
*/
- @Nonnull
static FetchGroup of(Class cls, String select) {
return XServiceProvider.fetchGroupOf(cls, select);
}
@@ -108,7 +105,6 @@ public interface FetchGroup {
*
* @return The FetchGroupBuilder with the given select clause which we will add fetch clauses to
*/
- @Nonnull
static FetchGroupBuilder of(Class cls) {
return XServiceProvider.fetchGroupOf(cls);
}
diff --git a/ebean-api/src/main/java/io/ebean/FetchGroupBuilder.java b/ebean-api/src/main/java/io/ebean/FetchGroupBuilder.java
index 121cceb53..aeda3e7e5 100644
--- a/ebean-api/src/main/java/io/ebean/FetchGroupBuilder.java
+++ b/ebean-api/src/main/java/io/ebean/FetchGroupBuilder.java
@@ -1,7 +1,5 @@
package io.ebean;
-import javax.annotation.Nonnull;
-
/**
* Builds a FetchGroup by adding fetch clauses.
*
@@ -28,80 +26,67 @@ public interface FetchGroupBuilder {
/**
* Specify specific properties to select (top level properties).
*/
- @Nonnull
FetchGroupBuilder select(String select);
/**
* Fetch all the properties at the given path.
*/
- @Nonnull
FetchGroupBuilder fetch(String path);
/**
* Fetch the path with the nested fetch group.
*/
- @Nonnull
FetchGroupBuilder fetch(String path, FetchGroup> nestedGroup);
/**
* Fetch the path using a query join with the nested fetch group.
*/
- @Nonnull
FetchGroupBuilder fetchQuery(String path, FetchGroup> nestedGroup);
/**
* Fetch the path lazily with the nested fetch group.
*/
- @Nonnull
FetchGroupBuilder fetchLazy(String path, FetchGroup> nestedGroup);
/**
* Fetch the path including specified properties.
*/
- @Nonnull
FetchGroupBuilder fetch(String path, String properties);
/**
* Fetch the path including all its properties using a query join.
*/
- @Nonnull
FetchGroupBuilder fetchQuery(String path);
/**
* Fetch the path including all its properties using L2 cache.
* Cache misses fallback to fetchQuery().
*/
- @Nonnull
FetchGroupBuilder fetchCache(String path);
/**
* Fetch the path including specified properties using a query join.
*/
- @Nonnull
FetchGroupBuilder fetchQuery(String path, String properties);
/**
* Fetch the path including specified properties using L2 cache.
* Cache misses fallback to fetchQuery().
*/
- @Nonnull
FetchGroupBuilder fetchCache(String path, String properties);
/**
* Fetch the path including all its properties lazily.
*/
- @Nonnull
FetchGroupBuilder fetchLazy(String path);
/**
* Fetch the path including specified properties lazily.
*/
- @Nonnull
FetchGroupBuilder fetchLazy(String path, String properties);
/**
* Build and return the FetchGroup.
*/
- @Nonnull
FetchGroup build();
}
diff --git a/ebean-api/src/main/java/io/ebean/Finder.java b/ebean-api/src/main/java/io/ebean/Finder.java
index cc5ef87f6..68b0fe203 100644
--- a/ebean-api/src/main/java/io/ebean/Finder.java
+++ b/ebean-api/src/main/java/io/ebean/Finder.java
@@ -1,6 +1,5 @@
package io.ebean;
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
@@ -139,7 +138,6 @@ public class Finder {
*
* Equivalent to {@link Database#reference(Class, Object)}
*/
- @Nonnull
public T ref(I id) {
return db().reference(type, id);
}
@@ -166,7 +164,6 @@ public class Finder {
/**
* Retrieves all entities of the given type.
*/
- @Nonnull
public List all() {
return query().findList();
}
diff --git a/ebean-api/src/main/java/io/ebean/PagedList.java b/ebean-api/src/main/java/io/ebean/PagedList.java
index 662f426f8..f4e1d3610 100644
--- a/ebean-api/src/main/java/io/ebean/PagedList.java
+++ b/ebean-api/src/main/java/io/ebean/PagedList.java
@@ -1,6 +1,5 @@
package io.ebean;
-import javax.annotation.Nonnull;
import java.util.List;
import java.util.concurrent.Future;
@@ -116,13 +115,11 @@ public interface PagedList {
*
* }
*/
- @Nonnull
Future getFutureCount();
/**
* Return the list of entities for this page.
*/
- @Nonnull
List getList();
/**
diff --git a/ebean-api/src/main/java/io/ebean/Query.java b/ebean-api/src/main/java/io/ebean/Query.java
index 0dc86905e..eee7bf8ff 100644
--- a/ebean-api/src/main/java/io/ebean/Query.java
+++ b/ebean-api/src/main/java/io/ebean/Query.java
@@ -1,6 +1,5 @@
package io.ebean;
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.persistence.NonUniqueResultException;
import java.sql.Connection;
@@ -689,7 +688,6 @@ public interface Query extends CancelableQuery {
* This query will execute against the Database that was used to create it.
*
*/
- @Nonnull
List findIds();
/**
@@ -727,7 +725,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
QueryIterator findIterate();
/**
@@ -749,7 +746,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
Stream findStream();
/**
@@ -772,7 +768,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
@Deprecated
Stream findLargeStream();
@@ -882,7 +877,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
List findList();
/**
@@ -898,7 +892,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
Set findSet();
/**
@@ -918,7 +911,6 @@ public interface Query extends CancelableQuery {
*
* }
*/
- @Nonnull
Map findMap();
/**
@@ -951,7 +943,6 @@ public interface Query extends CancelableQuery {
*
* @return the list of values for the selected property
*/
- @Nonnull
List findSingleAttributeList();
/**
@@ -1049,7 +1040,6 @@ public interface Query extends CancelableQuery {
/**
* Execute the query returning an optional bean.
*/
- @Nonnull
Optional findOneOrEmpty();
/**
@@ -1064,7 +1054,6 @@ public interface Query extends CancelableQuery {
* It will execute the query against the history returning the versions of the bean.
*
*/
- @Nonnull
List> findVersions();
/**
@@ -1074,7 +1063,6 @@ public interface Query extends CancelableQuery {
* It will execute the query against the history returning the versions of the bean.
*
*/
- @Nonnull
List> findVersionsBetween(Timestamp start, Timestamp end);
/**
@@ -1132,7 +1120,6 @@ public interface Query extends CancelableQuery {
*
* @return a Future object for the row count query
*/
- @Nonnull
FutureRowCount findFutureCount();
/**
@@ -1145,7 +1132,6 @@ public interface Query extends CancelableQuery {
*
* @return a Future object for the list of Id's
*/
- @Nonnull
FutureIds findFutureIds();
/**
@@ -1157,7 +1143,6 @@ public interface Query extends CancelableQuery {
*
* @return a Future object for the list result of the query
*/
- @Nonnull
FutureList findFutureList();
/**
@@ -1187,7 +1172,6 @@ public interface Query extends CancelableQuery {
*
* @return The PagedList
*/
- @Nonnull
PagedList findPagedList();
/**
diff --git a/ebean-api/src/main/java/io/ebean/SqlQuery.java b/ebean-api/src/main/java/io/ebean/SqlQuery.java
index 9a878f233..d7e184257 100644
--- a/ebean-api/src/main/java/io/ebean/SqlQuery.java
+++ b/ebean-api/src/main/java/io/ebean/SqlQuery.java
@@ -1,6 +1,5 @@
package io.ebean;
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -42,7 +41,6 @@ public interface SqlQuery extends Serializable, CancelableQuery {
/**
* Execute the query returning a list.
*/
- @Nonnull
List findList();
/**
@@ -119,7 +117,6 @@ public interface SqlQuery extends Serializable, CancelableQuery {
/**
* Execute the query returning an optional row.
*/
- @Nonnull
Optional findOneOrEmpty();
/**
diff --git a/ebean-api/src/main/java/io/ebean/plugin/BeanType.java b/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
index 661b370d2..e7f324a56 100644
--- a/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
+++ b/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
@@ -8,7 +8,6 @@ import io.ebean.event.BeanPersistController;
import io.ebean.event.BeanPersistListener;
import io.ebean.event.BeanQueryAdapter;
-import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.List;
import java.util.function.Consumer;
@@ -21,7 +20,6 @@ public interface BeanType {
/**
* Return the short name of the bean type.
*/
- @Nonnull
String name();
/**
@@ -35,7 +33,6 @@ public interface BeanType {
/**
* Return the full name of the bean type.
*/
- @Nonnull
String fullName();
/**
@@ -49,7 +46,6 @@ public interface BeanType {
/**
* Return the class type this BeanDescriptor describes.
*/
- @Nonnull
Class type();
/**
@@ -76,7 +72,6 @@ public interface BeanType {
/**
* Return all the properties for this bean type.
*/
- @Nonnull
Collection extends Property> allProperties();
/**
diff --git a/ebean-api/src/main/java/io/ebean/plugin/Property.java b/ebean-api/src/main/java/io/ebean/plugin/Property.java
index 50a1ebc3d..d37fa2959 100644
--- a/ebean-api/src/main/java/io/ebean/plugin/Property.java
+++ b/ebean-api/src/main/java/io/ebean/plugin/Property.java
@@ -1,7 +1,5 @@
package io.ebean.plugin;
-import javax.annotation.Nonnull;
-
/**
* Property of a entity bean that can be read.
*/
@@ -10,7 +8,6 @@ public interface Property {
/**
* Return the name of the property.
*/
- @Nonnull
String name();
/**
@@ -24,7 +21,6 @@ public interface Property {
/**
* Return the type of the property.
*/
- @Nonnull
Class> type();
/**