io.ebean.mocker.delegate.InterceptFind Maven / Gradle / Ivy
package io.ebean.mocker.delegate;
import io.ebean.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Stream;
/**
* Provides an adaption layer for find methods.
*/
public interface InterceptFind {
void refresh(Object bean);
void refreshMany(Object bean, String propertyName);
T findOne(Query query, Transaction transaction);
T find(Class beanType, Object id, Transaction transaction);
int findCount(Query query, Transaction transaction);
List findIds(Query> query, Transaction transaction);
void findEach(Query query, Consumer consumer, Transaction transaction);
void findEach(Query query, int i, Consumer> consumer, Transaction transaction);
void findEachWhile(Query query, Predicate consumer, Transaction transaction);
List findList(Query query, Transaction transaction);
FutureRowCount findFutureCount(Query query, Transaction transaction);
FutureIds findFutureIds(Query query, Transaction transaction);
FutureList findFutureList(Query query, Transaction transaction);
PagedList findPagedList(Query query, Transaction transaction);
Set findSet(Query query, Transaction transaction);
Map findMap(Query query, Transaction transaction);
List> findVersions(Query query, Transaction transaction);
List findSingleAttributeList(Query> query, Transaction transaction);
QueryIterator findIterate(Query query, Transaction transaction);
Stream findStream(Query query, Transaction transaction);
boolean exists(Query> query, Transaction transaction);
}