Collection<Key> keysForOrg = CollectionUtils.collect(unitsForOrg(org.getKey(), false, false), new KeyBasedData.ToKey());
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(uk.org.woodcraft.bookings.datamodel.Transaction.class);
query.declareImports("import com.google.appengine.api.datastore.Key; import java.util.Collection");
query.setOrdering("timestamp");
query.setFilter("unitKeysParam.contains(unitKey) && eventKey == eventKeyParam");
query.declareParameters("Collection unitKeysParam, Key eventKeyParam");
return batchQuery(query, keysForOrg, event.getKeyCheckNotNull());