#708 - Refactor - Remove BeanCollectionTouched interface

This commit is contained in:
Robin Bygrave committed 2016-05-18 10:13:03 +12:00
1 parent f181e3946f
commit 1c9b974427
6 files changed
+3 -76

No files matched your search

@@ -5,7 +5,6 @@ import com.avaje.ebean.ExpressionList;
import com.avaje.ebean.OrderBy;
import com.avaje.ebean.PersistenceContextScope;
import com.avaje.ebean.Query;
import com.avaje.ebean.bean.BeanCollectionTouched;
import com.avaje.ebean.bean.CallStack;
import com.avaje.ebean.bean.ObjectGraphNode;
import com.avaje.ebean.bean.PersistenceContext;
@@ -226,18 +225,6 @@ public interface SpiQuery<T> extends Query<T> {
List<String> getSoftDeletePredicates();
/**
* Return a listener that wants to be notified when the bean collection is
* first used.
*/
BeanCollectionTouched getBeanCollectionTouched();
/**
* Set a listener to be notified when the bean collection has been touched
* (when the list/set/map is first used).
*/
void setBeanCollectionTouched(BeanCollectionTouched notify);
/**
* Set the list of Id's that is being populated.
* <p>
@@ -4,7 +4,6 @@ import com.avaje.ebean.QueryIterator;
import com.avaje.ebean.ValuePair;
import com.avaje.ebean.Version;
import com.avaje.ebean.bean.BeanCollection;
import com.avaje.ebean.bean.BeanCollectionTouched;
import com.avaje.ebean.bean.EntityBean;
import com.avaje.ebean.bean.ObjectGraphNode;
import com.avaje.ebean.config.dbplatform.DatabasePlatform;
@@ -300,14 +299,6 @@ public class CQueryEngine {
}
BeanCollection<T> beanCollection = cquery.readCollection();
BeanCollectionTouched collectionTouched = query.getBeanCollectionTouched();
if (collectionTouched != null) {
// register a listener that wants to be notified when the
// bean collection is first used
beanCollection.setBeanCollectionTouched(collectionTouched);
}
if (request.isLogSummary()) {
logFindManySummary(cquery);
}
@@ -2,7 +2,6 @@ package com.avaje.ebeaninternal.server.querydefn;
import com.avaje.ebean.*;
import com.avaje.ebean.OrderBy.Property;
import com.avaje.ebean.bean.BeanCollectionTouched;
import com.avaje.ebean.bean.CallStack;
import com.avaje.ebean.bean.ObjectGraphNode;
import com.avaje.ebean.bean.ObjectGraphOrigin;
@@ -48,8 +47,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
private final EbeanServer server;
private BeanCollectionTouched beanCollectionTouched;
private final ExpressionFactory expressionFactory;
/**
@@ -1526,16 +1523,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return disableReadAudit;
}
@Override
public void setBeanCollectionTouched(BeanCollectionTouched notify) {
this.beanCollectionTouched = notify;
}
@Override
public BeanCollectionTouched getBeanCollectionTouched() {
return beanCollectionTouched;
}
@Override
public List<Object> getIdList() {
return partialIds;