Fix for #87 - v4 - Remove Query setBackgroundFetchAfter() feature

This commit is contained in:
Rob Bygrave committed 2014-04-20 19:30:40 +12:00
1 parent 18d9c53ce3
commit fc628d336d
29 files changed
+54 -575

No files matched your search

@@ -140,11 +140,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
private List<Object> partialIds;
/**
* The rows after which the fetch continues in a bg thread.
*/
private int backgroundFetchAfter;
private int timeout = -1;
/**
@@ -434,7 +429,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
copy.additionalWhere = additionalWhere;
copy.additionalHaving = additionalHaving;
copy.distinct = distinct;
copy.backgroundFetchAfter = backgroundFetchAfter;
copy.timeout = timeout;
copy.mapKey = mapKey;
copy.id = id;
@@ -1089,15 +1083,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return this;
}
public int getBackgroundFetchAfter() {
return backgroundFetchAfter;
}
public DefaultOrmQuery<T> setBackgroundFetchAfter(int backgroundFetchAfter) {
this.backgroundFetchAfter = backgroundFetchAfter;
return this;
}
public Object getId() {
return id;
}
@@ -1212,23 +1197,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return whereExpressions;
}
/**
* Return true if using background fetching or a queryListener.
*/
public boolean createOwnTransaction() {
if (futureFetch){
// the future fetches have already created
// their own transaction
return false;
}
if (backgroundFetchAfter > 0) {
// run in own transaction as we can't know how long
// the background fetching will continue etc
return true;
}
return false;
}
public String getGeneratedSql() {
return generatedSql;
}