#2422 - Remove extraneous jsr 305 @Nonnull

This commit is contained in:
Rob Bygrave committed 2021-10-19 17:33:23 +13:00
1 parent 709eb369c9
commit c7bb027c7d
16 files changed
-104

No files matched your search

@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@@ -81,7 +80,6 @@ public abstract class BeanFinder<I,T> {
* <p> * <p>
* Equivalent to {@link Database#reference(Class, Object)} * Equivalent to {@link Database#reference(Class, Object)}
*/ */
@Nonnull
public T ref(I id) { public T ref(I id) {
return db().reference(type, id); return db().reference(type, id);
} }
@@ -111,7 +109,6 @@ public abstract class BeanFinder<I,T> {
/** /**
* Retrieves all entities of the given type. * Retrieves all entities of the given type.
*/ */
@Nonnull
public List<T> findAll() { public List<T> findAll() {
return query().findList(); return query().findList();
} }
-3
View File
@@ -6,7 +6,6 @@ import io.ebean.plugin.Property;
import io.ebean.text.csv.CsvReader; import io.ebean.text.csv.CsvReader;
import io.ebean.text.json.JsonContext; import io.ebean.text.json.JsonContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.OptimisticLockException; import javax.persistence.OptimisticLockException;
import javax.persistence.PersistenceException; import javax.persistence.PersistenceException;
@@ -523,7 +522,6 @@ public final class DB {
* @param bean The entity bean to check uniqueness on * @param bean The entity bean to check uniqueness on
* @return a set of Properties if constraint validation was detected or empty list. * @return a set of Properties if constraint validation was detected or empty list.
*/ */
@Nonnull
public static Set<Property> checkUniqueness(Object bean) { public static Set<Property> checkUniqueness(Object bean) {
return getDefault().checkUniqueness(bean); return getDefault().checkUniqueness(bean);
} }
@@ -531,7 +529,6 @@ public final class DB {
/** /**
* Same as {@link #checkUniqueness(Object)}. but with given transaction. * Same as {@link #checkUniqueness(Object)}. but with given transaction.
*/ */
@Nonnull
public static Set<Property> checkUniqueness(Object bean, Transaction transaction) { public static Set<Property> checkUniqueness(Object bean, Transaction transaction) {
return getDefault().checkUniqueness(bean, transaction); return getDefault().checkUniqueness(bean, transaction);
} }
@@ -10,7 +10,6 @@ import io.ebean.plugin.SpiServer;
import io.ebean.text.csv.CsvReader; import io.ebean.text.csv.CsvReader;
import io.ebean.text.json.JsonContext; import io.ebean.text.json.JsonContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.OptimisticLockException; import javax.persistence.OptimisticLockException;
import javax.persistence.PersistenceException; import javax.persistence.PersistenceException;
@@ -949,7 +948,6 @@ public interface Database {
* @param beanType the type of entity bean * @param beanType the type of entity bean
* @param id the id value * @param id the id value
*/ */
@Nonnull
<T> T reference(Class<T> beanType, Object id); <T> T reference(Class<T> beanType, Object id);
/** /**
@@ -1295,13 +1293,11 @@ public interface Database {
* @param bean The entity bean to check uniqueness on * @param bean The entity bean to check uniqueness on
* @return a set of Properties if constraint validation was detected or empty list. * @return a set of Properties if constraint validation was detected or empty list.
*/ */
@Nonnull
Set<Property> checkUniqueness(Object bean); Set<Property> checkUniqueness(Object bean);
/** /**
* Same as {@link #checkUniqueness(Object)}. but with given transaction. * Same as {@link #checkUniqueness(Object)}. but with given transaction.
*/ */
@Nonnull
Set<Property> checkUniqueness(Object bean, Transaction transaction); Set<Property> checkUniqueness(Object bean, Transaction transaction);
/** /**
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@@ -43,7 +42,6 @@ public interface DtoQuery<T> extends CancelableQuery {
/** /**
* Execute the query returning a list. * Execute the query returning a list.
*/ */
@Nonnull
List<T> findList(); List<T> findList();
/** /**
@@ -53,7 +51,6 @@ public interface DtoQuery<T> extends CancelableQuery {
* resultSet and potentially connection and MUST be closed. We should use * resultSet and potentially connection and MUST be closed. We should use
* QueryIterator in a <em>try with resource block</em>. * QueryIterator in a <em>try with resource block</em>.
*/ */
@Nonnull
QueryIterator<T> findIterate(); QueryIterator<T> findIterate();
/** /**
@@ -63,7 +60,6 @@ public interface DtoQuery<T> extends CancelableQuery {
* resultSet and potentially connection and MUST be closed. We should use * resultSet and potentially connection and MUST be closed. We should use
* the Stream in a <em>try with resource block</em>. * the Stream in a <em>try with resource block</em>.
*/ */
@Nonnull
Stream<T> findStream(); Stream<T> findStream();
/** /**
@@ -105,7 +101,6 @@ public interface DtoQuery<T> extends CancelableQuery {
/** /**
* Execute the query returning an optional bean. * Execute the query returning an optional bean.
*/ */
@Nonnull
Optional<T> findOneOrEmpty(); Optional<T> findOneOrEmpty();
/** /**
@@ -6,7 +6,6 @@ import io.ebean.plugin.Property;
import io.ebean.text.csv.CsvReader; import io.ebean.text.csv.CsvReader;
import io.ebean.text.json.JsonContext; import io.ebean.text.json.JsonContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.OptimisticLockException; import javax.persistence.OptimisticLockException;
import javax.persistence.PersistenceException; import javax.persistence.PersistenceException;
@@ -506,7 +505,6 @@ public final class Ebean {
* @param bean The entity bean to check uniqueness on * @param bean The entity bean to check uniqueness on
* @return a set of Properties if constraint validation was detected or empty list. * @return a set of Properties if constraint validation was detected or empty list.
*/ */
@Nonnull
public static Set<Property> checkUniqueness(Object bean) { public static Set<Property> checkUniqueness(Object bean) {
return getDefault().checkUniqueness(bean); return getDefault().checkUniqueness(bean);
} }
@@ -514,7 +512,6 @@ public final class Ebean {
/** /**
* Same as {@link #checkUniqueness(Object)}. but with given transaction. * Same as {@link #checkUniqueness(Object)}. but with given transaction.
*/ */
@Nonnull
public static Set<Property> checkUniqueness(Object bean, Transaction transaction) { public static Set<Property> checkUniqueness(Object bean, Transaction transaction) {
return getDefault().checkUniqueness(bean, transaction); return getDefault().checkUniqueness(bean, transaction);
} }
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@@ -25,13 +24,11 @@ public class EmptyPagedList<T> implements PagedList<T> {
// do nothing // do nothing
} }
@Nonnull
@Override @Override
public Future<Integer> getFutureCount() { public Future<Integer> getFutureCount() {
return null; return null;
} }
@Nonnull
@Override @Override
public List<T> getList() { public List<T> getList() {
return Collections.emptyList(); return Collections.emptyList();
@@ -6,7 +6,6 @@ import io.ebean.search.TextCommonTerms;
import io.ebean.search.TextQueryString; import io.ebean.search.TextQueryString;
import io.ebean.search.TextSimple; import io.ebean.search.TextSimple;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.NonUniqueResultException; import javax.persistence.NonUniqueResultException;
import java.sql.Connection; import java.sql.Connection;
@@ -327,7 +326,6 @@ public interface ExpressionList<T> {
* *
* @see Query#findList() * @see Query#findList()
*/ */
@Nonnull
List<T> findList(); List<T> findList();
/** /**
@@ -335,7 +333,6 @@ public interface ExpressionList<T> {
* *
* @see Query#findIds() * @see Query#findIds()
*/ */
@Nonnull
<A> List<A> findIds(); <A> List<A> findIds();
/** /**
@@ -351,7 +348,6 @@ public interface ExpressionList<T> {
* *
* @see Query#findSet() * @see Query#findSet()
*/ */
@Nonnull
Set<T> findSet(); Set<T> findSet();
/** /**
@@ -359,7 +355,6 @@ public interface ExpressionList<T> {
* *
* @see Query#findMap() * @see Query#findMap()
*/ */
@Nonnull
<K> Map<K, T> findMap(); <K> Map<K, T> findMap();
/** /**
@@ -392,7 +387,6 @@ public interface ExpressionList<T> {
* *
* @return the list of values for the selected property * @return the list of values for the selected property
*/ */
@Nonnull
<A> List<A> findSingleAttributeList(); <A> List<A> findSingleAttributeList();
/** /**
@@ -429,7 +423,6 @@ public interface ExpressionList<T> {
/** /**
* Execute the query returning an optional bean. * Execute the query returning an optional bean.
*/ */
@Nonnull
Optional<T> findOneOrEmpty(); Optional<T> findOneOrEmpty();
/** /**
@@ -442,7 +435,6 @@ public interface ExpressionList<T> {
* *
* @return a Future object for the row count query * @return a Future object for the row count query
*/ */
@Nonnull
FutureRowCount<T> findFutureCount(); FutureRowCount<T> findFutureCount();
/** /**
@@ -455,7 +447,6 @@ public interface ExpressionList<T> {
* *
* @return a Future object for the list of Id's * @return a Future object for the list of Id's
*/ */
@Nonnull
FutureIds<T> findFutureIds(); FutureIds<T> findFutureIds();
/** /**
@@ -468,7 +459,6 @@ public interface ExpressionList<T> {
* *
* @return a Future object for the list result of the query * @return a Future object for the list result of the query
*/ */
@Nonnull
FutureList<T> findFutureList(); FutureList<T> findFutureList();
/** /**
@@ -499,7 +489,6 @@ public interface ExpressionList<T> {
* @return The PagedList * @return The PagedList
* @see Query#findPagedList() * @see Query#findPagedList()
*/ */
@Nonnull
PagedList<T> findPagedList(); PagedList<T> findPagedList();
/** /**
@@ -509,7 +498,6 @@ public interface ExpressionList<T> {
* It will execute the query against the history returning the versions of the bean. * It will execute the query against the history returning the versions of the bean.
* </p> * </p>
*/ */
@Nonnull
List<Version<T>> findVersions(); List<Version<T>> findVersions();
/** /**
@@ -519,13 +507,11 @@ public interface ExpressionList<T> {
* It will execute the query against the history returning the versions of the bean. * It will execute the query against the history returning the versions of the bean.
* </p> * </p>
*/ */
@Nonnull
List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end); List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end);
/** /**
* Add some filter predicate expressions to the many property. * Add some filter predicate expressions to the many property.
*/ */
@Nonnull
ExpressionList<T> filterMany(String manyProperty); ExpressionList<T> filterMany(String manyProperty);
/** /**
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.NonUniqueResultException; import javax.persistence.NonUniqueResultException;
import java.time.Clock; import java.time.Clock;
@@ -82,7 +81,6 @@ public interface ExtendedServer {
* *
* @see Query#findIds() * @see Query#findIds()
*/ */
@Nonnull
<A, T> List<A> findIds(Query<T> query, Transaction transaction); <A, T> List<A> findIds(Query<T> query, Transaction transaction);
/** /**
@@ -100,7 +98,6 @@ public interface ExtendedServer {
* @see Query#findEach(Consumer) * @see Query#findEach(Consumer)
* @see Query#findEachWhile(Predicate) * @see Query#findEachWhile(Predicate)
*/ */
@Nonnull
<T> QueryIterator<T> findIterate(Query<T> query, Transaction transaction); <T> QueryIterator<T> findIterate(Query<T> query, Transaction transaction);
/** /**
@@ -112,7 +109,6 @@ public interface ExtendedServer {
* Note that the stream needs to be closed so use with try with resources. * Note that the stream needs to be closed so use with try with resources.
* </p> * </p>
*/ */
@Nonnull
<T> Stream<T> findStream(Query<T> query, Transaction transaction); <T> Stream<T> findStream(Query<T> query, Transaction transaction);
/** /**
@@ -125,7 +121,6 @@ public interface ExtendedServer {
* <p> * <p>
* Note that the stream needs to be closed so use with try with resources. * Note that the stream needs to be closed so use with try with resources.
*/ */
@Nonnull
@Deprecated @Deprecated
<T> Stream<T> findLargeStream(Query<T> query, Transaction transaction); <T> Stream<T> findLargeStream(Query<T> query, Transaction transaction);
@@ -210,7 +205,6 @@ public interface ExtendedServer {
* It will execute the query against the history returning the versions of the bean. * It will execute the query against the history returning the versions of the bean.
* </p> * </p>
*/ */
@Nonnull
<T> List<Version<T>> findVersions(Query<T> query, Transaction transaction); <T> List<Version<T>> findVersions(Query<T> query, Transaction transaction);
/** /**
@@ -235,7 +229,6 @@ public interface ExtendedServer {
* @return the list of fetched beans. * @return the list of fetched beans.
* @see Query#findList() * @see Query#findList()
*/ */
@Nonnull
<T> List<T> findList(Query<T> query, Transaction transaction); <T> List<T> findList(Query<T> query, Transaction transaction);
/** /**
@@ -251,7 +244,6 @@ public interface ExtendedServer {
* @return a Future object for the row count query * @return a Future object for the row count query
* @see Query#findFutureCount() * @see Query#findFutureCount()
*/ */
@Nonnull
<T> FutureRowCount<T> findFutureCount(Query<T> query, Transaction transaction); <T> FutureRowCount<T> findFutureCount(Query<T> query, Transaction transaction);
/** /**
@@ -267,7 +259,6 @@ public interface ExtendedServer {
* @return a Future object for the list of Id's * @return a Future object for the list of Id's
* @see Query#findFutureIds() * @see Query#findFutureIds()
*/ */
@Nonnull
<T> FutureIds<T> findFutureIds(Query<T> query, Transaction transaction); <T> FutureIds<T> findFutureIds(Query<T> query, Transaction transaction);
/** /**
@@ -284,7 +275,6 @@ public interface ExtendedServer {
* @return a Future object for the list result of the query * @return a Future object for the list result of the query
* @see Query#findFutureList() * @see Query#findFutureList()
*/ */
@Nonnull
<T> FutureList<T> findFutureList(Query<T> query, Transaction transaction); <T> FutureList<T> findFutureList(Query<T> query, Transaction transaction);
/** /**
@@ -316,7 +306,6 @@ public interface ExtendedServer {
* @return The PagedList * @return The PagedList
* @see Query#findPagedList() * @see Query#findPagedList()
*/ */
@Nonnull
<T> PagedList<T> findPagedList(Query<T> query, Transaction transaction); <T> PagedList<T> findPagedList(Query<T> query, Transaction transaction);
/** /**
@@ -341,7 +330,6 @@ public interface ExtendedServer {
* @return the set of fetched beans. * @return the set of fetched beans.
* @see Query#findSet() * @see Query#findSet()
*/ */
@Nonnull
<T> Set<T> findSet(Query<T> query, Transaction transaction); <T> Set<T> findSet(Query<T> query, Transaction transaction);
/** /**
@@ -358,7 +346,6 @@ public interface ExtendedServer {
* @return the map of fetched beans. * @return the map of fetched beans.
* @see Query#findMap() * @see Query#findMap()
*/ */
@Nonnull
<K, T> Map<K, T> findMap(Query<T> query, Transaction transaction); <K, T> Map<K, T> findMap(Query<T> query, Transaction transaction);
/** /**
@@ -391,7 +378,6 @@ public interface ExtendedServer {
* @return the list of values for the selected property * @return the list of values for the selected property
* @see Query#findSingleAttributeList() * @see Query#findSingleAttributeList()
*/ */
@Nonnull
<A, T> List<A> findSingleAttributeList(Query<T> query, Transaction transaction); <A, T> List<A> findSingleAttributeList(Query<T> query, Transaction transaction);
/** /**
@@ -419,7 +405,6 @@ public interface ExtendedServer {
/** /**
* Similar to findOne() but returns an Optional (rather than nullable). * Similar to findOne() but returns an Optional (rather than nullable).
*/ */
@Nonnull
<T> Optional<T> findOneOrEmpty(Query<T> query, Transaction transaction); <T> Optional<T> findOneOrEmpty(Query<T> query, Transaction transaction);
/** /**
@@ -463,7 +448,6 @@ public interface ExtendedServer {
* @return the list of fetched MapBean. * @return the list of fetched MapBean.
* @see SqlQuery#findList() * @see SqlQuery#findList()
*/ */
@Nonnull
List<SqlRow> findList(SqlQuery query, Transaction transaction); List<SqlRow> findList(SqlQuery query, Transaction transaction);
/** /**
@@ -2,8 +2,6 @@ package io.ebean;
import io.ebean.service.SpiFetchGroupQuery; import io.ebean.service.SpiFetchGroupQuery;
import javax.annotation.Nonnull;
/** /**
* Defines what part of the object graph to load (select and fetch clauses). * Defines what part of the object graph to load (select and fetch clauses).
* <p> * <p>
@@ -83,7 +81,6 @@ public interface FetchGroup<T> {
* *
* @return The FetchGroup with the given select clause * @return The FetchGroup with the given select clause
*/ */
@Nonnull
static <T> FetchGroup<T> of(Class<T> cls, String select) { static <T> FetchGroup<T> of(Class<T> cls, String select) {
return XServiceProvider.fetchGroupOf(cls, select); return XServiceProvider.fetchGroupOf(cls, select);
} }
@@ -108,7 +105,6 @@ public interface FetchGroup<T> {
* *
* @return The FetchGroupBuilder with the given select clause which we will add fetch clauses to * @return The FetchGroupBuilder with the given select clause which we will add fetch clauses to
*/ */
@Nonnull
static <T> FetchGroupBuilder<T> of(Class<T> cls) { static <T> FetchGroupBuilder<T> of(Class<T> cls) {
return XServiceProvider.fetchGroupOf(cls); return XServiceProvider.fetchGroupOf(cls);
} }
@@ -1,7 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
/** /**
* Builds a FetchGroup by adding fetch clauses. * Builds a FetchGroup by adding fetch clauses.
* <p> * <p>
@@ -28,80 +26,67 @@ public interface FetchGroupBuilder<T> {
/** /**
* Specify specific properties to select (top level properties). * Specify specific properties to select (top level properties).
*/ */
@Nonnull
FetchGroupBuilder<T> select(String select); FetchGroupBuilder<T> select(String select);
/** /**
* Fetch all the properties at the given path. * Fetch all the properties at the given path.
*/ */
@Nonnull
FetchGroupBuilder<T> fetch(String path); FetchGroupBuilder<T> fetch(String path);
/** /**
* Fetch the path with the nested fetch group. * Fetch the path with the nested fetch group.
*/ */
@Nonnull
FetchGroupBuilder<T> fetch(String path, FetchGroup<?> nestedGroup); FetchGroupBuilder<T> fetch(String path, FetchGroup<?> nestedGroup);
/** /**
* Fetch the path using a query join with the nested fetch group. * Fetch the path using a query join with the nested fetch group.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchQuery(String path, FetchGroup<?> nestedGroup); FetchGroupBuilder<T> fetchQuery(String path, FetchGroup<?> nestedGroup);
/** /**
* Fetch the path lazily with the nested fetch group. * Fetch the path lazily with the nested fetch group.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchLazy(String path, FetchGroup<?> nestedGroup); FetchGroupBuilder<T> fetchLazy(String path, FetchGroup<?> nestedGroup);
/** /**
* Fetch the path including specified properties. * Fetch the path including specified properties.
*/ */
@Nonnull
FetchGroupBuilder<T> fetch(String path, String properties); FetchGroupBuilder<T> fetch(String path, String properties);
/** /**
* Fetch the path including all its properties using a query join. * Fetch the path including all its properties using a query join.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchQuery(String path); FetchGroupBuilder<T> fetchQuery(String path);
/** /**
* Fetch the path including all its properties using L2 cache. * Fetch the path including all its properties using L2 cache.
* Cache misses fallback to fetchQuery(). * Cache misses fallback to fetchQuery().
*/ */
@Nonnull
FetchGroupBuilder<T> fetchCache(String path); FetchGroupBuilder<T> fetchCache(String path);
/** /**
* Fetch the path including specified properties using a query join. * Fetch the path including specified properties using a query join.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchQuery(String path, String properties); FetchGroupBuilder<T> fetchQuery(String path, String properties);
/** /**
* Fetch the path including specified properties using L2 cache. * Fetch the path including specified properties using L2 cache.
* Cache misses fallback to fetchQuery(). * Cache misses fallback to fetchQuery().
*/ */
@Nonnull
FetchGroupBuilder<T> fetchCache(String path, String properties); FetchGroupBuilder<T> fetchCache(String path, String properties);
/** /**
* Fetch the path including all its properties lazily. * Fetch the path including all its properties lazily.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchLazy(String path); FetchGroupBuilder<T> fetchLazy(String path);
/** /**
* Fetch the path including specified properties lazily. * Fetch the path including specified properties lazily.
*/ */
@Nonnull
FetchGroupBuilder<T> fetchLazy(String path, String properties); FetchGroupBuilder<T> fetchLazy(String path, String properties);
/** /**
* Build and return the FetchGroup. * Build and return the FetchGroup.
*/ */
@Nonnull
FetchGroup<T> build(); FetchGroup<T> build();
} }
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;
@@ -139,7 +138,6 @@ public class Finder<I, T> {
* <p> * <p>
* Equivalent to {@link Database#reference(Class, Object)} * Equivalent to {@link Database#reference(Class, Object)}
*/ */
@Nonnull
public T ref(I id) { public T ref(I id) {
return db().reference(type, id); return db().reference(type, id);
} }
@@ -166,7 +164,6 @@ public class Finder<I, T> {
/** /**
* Retrieves all entities of the given type. * Retrieves all entities of the given type.
*/ */
@Nonnull
public List<T> all() { public List<T> all() {
return query().findList(); return query().findList();
} }
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import java.util.List; import java.util.List;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@@ -116,13 +115,11 @@ public interface PagedList<T> {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
Future<Integer> getFutureCount(); Future<Integer> getFutureCount();
/** /**
* Return the list of entities for this page. * Return the list of entities for this page.
*/ */
@Nonnull
List<T> getList(); List<T> getList();
/** /**
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.persistence.NonUniqueResultException; import javax.persistence.NonUniqueResultException;
import java.sql.Connection; import java.sql.Connection;
@@ -689,7 +688,6 @@ public interface Query<T> extends CancelableQuery {
* This query will execute against the Database that was used to create it. * This query will execute against the Database that was used to create it.
* </p> * </p>
*/ */
@Nonnull
<A> List<A> findIds(); <A> List<A> findIds();
/** /**
@@ -727,7 +725,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
QueryIterator<T> findIterate(); QueryIterator<T> findIterate();
/** /**
@@ -749,7 +746,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
Stream<T> findStream(); Stream<T> findStream();
/** /**
@@ -772,7 +768,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
@Deprecated @Deprecated
Stream<T> findLargeStream(); Stream<T> findLargeStream();
@@ -882,7 +877,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
List<T> findList(); List<T> findList();
/** /**
@@ -898,7 +892,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
Set<T> findSet(); Set<T> findSet();
/** /**
@@ -918,7 +911,6 @@ public interface Query<T> extends CancelableQuery {
* *
* }</pre> * }</pre>
*/ */
@Nonnull
<K> Map<K, T> findMap(); <K> Map<K, T> findMap();
/** /**
@@ -951,7 +943,6 @@ public interface Query<T> extends CancelableQuery {
* *
* @return the list of values for the selected property * @return the list of values for the selected property
*/ */
@Nonnull
<A> List<A> findSingleAttributeList(); <A> List<A> findSingleAttributeList();
/** /**
@@ -1049,7 +1040,6 @@ public interface Query<T> extends CancelableQuery {
/** /**
* Execute the query returning an optional bean. * Execute the query returning an optional bean.
*/ */
@Nonnull
Optional<T> findOneOrEmpty(); Optional<T> findOneOrEmpty();
/** /**
@@ -1064,7 +1054,6 @@ public interface Query<T> extends CancelableQuery {
* It will execute the query against the history returning the versions of the bean. * It will execute the query against the history returning the versions of the bean.
* </p> * </p>
*/ */
@Nonnull
List<Version<T>> findVersions(); List<Version<T>> findVersions();
/** /**
@@ -1074,7 +1063,6 @@ public interface Query<T> extends CancelableQuery {
* It will execute the query against the history returning the versions of the bean. * It will execute the query against the history returning the versions of the bean.
* </p> * </p>
*/ */
@Nonnull
List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end); List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end);
/** /**
@@ -1132,7 +1120,6 @@ public interface Query<T> extends CancelableQuery {
* *
* @return a Future object for the row count query * @return a Future object for the row count query
*/ */
@Nonnull
FutureRowCount<T> findFutureCount(); FutureRowCount<T> findFutureCount();
/** /**
@@ -1145,7 +1132,6 @@ public interface Query<T> extends CancelableQuery {
* *
* @return a Future object for the list of Id's * @return a Future object for the list of Id's
*/ */
@Nonnull
FutureIds<T> findFutureIds(); FutureIds<T> findFutureIds();
/** /**
@@ -1157,7 +1143,6 @@ public interface Query<T> extends CancelableQuery {
* *
* @return a Future object for the list result of the query * @return a Future object for the list result of the query
*/ */
@Nonnull
FutureList<T> findFutureList(); FutureList<T> findFutureList();
/** /**
@@ -1187,7 +1172,6 @@ public interface Query<T> extends CancelableQuery {
* *
* @return The PagedList * @return The PagedList
*/ */
@Nonnull
PagedList<T> findPagedList(); PagedList<T> findPagedList();
/** /**
@@ -1,6 +1,5 @@
package io.ebean; package io.ebean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@@ -42,7 +41,6 @@ public interface SqlQuery extends Serializable, CancelableQuery {
/** /**
* Execute the query returning a list. * Execute the query returning a list.
*/ */
@Nonnull
List<SqlRow> findList(); List<SqlRow> findList();
/** /**
@@ -119,7 +117,6 @@ public interface SqlQuery extends Serializable, CancelableQuery {
/** /**
* Execute the query returning an optional row. * Execute the query returning an optional row.
*/ */
@Nonnull
Optional<SqlRow> findOneOrEmpty(); Optional<SqlRow> findOneOrEmpty();
/** /**
@@ -8,7 +8,6 @@ import io.ebean.event.BeanPersistController;
import io.ebean.event.BeanPersistListener; import io.ebean.event.BeanPersistListener;
import io.ebean.event.BeanQueryAdapter; import io.ebean.event.BeanQueryAdapter;
import javax.annotation.Nonnull;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
@@ -21,7 +20,6 @@ public interface BeanType<T> {
/** /**
* Return the short name of the bean type. * Return the short name of the bean type.
*/ */
@Nonnull
String name(); String name();
/** /**
@@ -35,7 +33,6 @@ public interface BeanType<T> {
/** /**
* Return the full name of the bean type. * Return the full name of the bean type.
*/ */
@Nonnull
String fullName(); String fullName();
/** /**
@@ -49,7 +46,6 @@ public interface BeanType<T> {
/** /**
* Return the class type this BeanDescriptor describes. * Return the class type this BeanDescriptor describes.
*/ */
@Nonnull
Class<T> type(); Class<T> type();
/** /**
@@ -76,7 +72,6 @@ public interface BeanType<T> {
/** /**
* Return all the properties for this bean type. * Return all the properties for this bean type.
*/ */
@Nonnull
Collection<? extends Property> allProperties(); Collection<? extends Property> allProperties();
/** /**
@@ -1,7 +1,5 @@
package io.ebean.plugin; package io.ebean.plugin;
import javax.annotation.Nonnull;
/** /**
* Property of a entity bean that can be read. * Property of a entity bean that can be read.
*/ */
@@ -10,7 +8,6 @@ public interface Property {
/** /**
* Return the name of the property. * Return the name of the property.
*/ */
@Nonnull
String name(); String name();
/** /**
@@ -24,7 +21,6 @@ public interface Property {
/** /**
* Return the type of the property. * Return the type of the property.
*/ */
@Nonnull
Class<?> type(); Class<?> type();
/** /**