mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#679 - Remove SqlQuery.setListener() ... migrate to SqlQuery.findEach() or SqlQuery.findEachWhile()
This commit is contained in:
1 parent
f867cd4c01
commit
840c5f8992
6 files changed
+1
-105
No files matched your search
@@ -4,7 +4,6 @@ import com.avaje.ebean.EbeanServer;
|
||||
import com.avaje.ebean.QueryEachConsumer;
|
||||
import com.avaje.ebean.QueryEachWhileConsumer;
|
||||
import com.avaje.ebean.SqlFutureList;
|
||||
import com.avaje.ebean.SqlQueryListener;
|
||||
import com.avaje.ebean.SqlRow;
|
||||
import com.avaje.ebeaninternal.api.BindParams;
|
||||
import com.avaje.ebeaninternal.api.SpiSqlQuery;
|
||||
@@ -23,8 +22,6 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
|
||||
|
||||
private final transient EbeanServer server;
|
||||
|
||||
private transient SqlQueryListener queryListener;
|
||||
|
||||
private String query;
|
||||
|
||||
private int firstRow;
|
||||
@@ -94,26 +91,6 @@ public class DefaultRelationalQuery implements SpiSqlQuery {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the findListener is one has been set.
|
||||
*/
|
||||
public SqlQueryListener getListener() {
|
||||
return queryListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a listener. This is designed for large fetches
|
||||
* where lots are rows are to be processed and instead of
|
||||
* returning all the rows they are processed one at a time.
|
||||
* <p>
|
||||
* Note that the returning List Set or Map will be empty.
|
||||
* </p>
|
||||
*/
|
||||
public DefaultRelationalQuery setListener(SqlQueryListener queryListener) {
|
||||
this.queryListener = queryListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "SqlQuery [" + query + "]";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user