mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#331 - Remove deprecated method - EbeanServer.findVisit() ... in favor of findEachWhile() or findEach()
This commit is contained in:
@@ -413,11 +413,6 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void findVisit(Query<T> query, QueryResultVisitor<T> visitor, Transaction transaction) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> List<T> findList(Query<T> query, Transaction transaction) {
|
||||
return null;
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package com.avaje.tests.query;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.EbeanServer;
|
||||
import com.avaje.ebean.FetchConfig;
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.ebean.QueryResultVisitor;
|
||||
import com.avaje.ebean.QueryEachConsumer;
|
||||
import com.avaje.tests.model.basic.Customer;
|
||||
import com.avaje.tests.model.basic.ResetBasicData;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class TestQueryFindVisit extends BaseTestCase {
|
||||
|
||||
@@ -29,11 +28,9 @@ public class TestQueryFindVisit extends BaseTestCase {
|
||||
|
||||
final AtomicInteger counter = new AtomicInteger(0);
|
||||
|
||||
query.findVisit(new QueryResultVisitor<Customer>() {
|
||||
|
||||
public boolean accept(Customer bean) {
|
||||
query.findEach(new QueryEachConsumer<Customer>() {
|
||||
public void accept(Customer bean) {
|
||||
counter.incrementAndGet();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -56,14 +53,13 @@ public class TestQueryFindVisit extends BaseTestCase {
|
||||
|
||||
final AtomicInteger counter = new AtomicInteger(0);
|
||||
|
||||
query.findVisit(new QueryResultVisitor<Customer>() {
|
||||
query.findEach(new QueryEachConsumer<Customer>() {
|
||||
|
||||
public boolean accept(Customer bean) {
|
||||
public void accept(Customer bean) {
|
||||
counter.incrementAndGet();
|
||||
if (counter.intValue() > 0) {
|
||||
throw new IllegalStateException("cause a failure");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user