Search in sources :

Example 1 with ListByIndexIterator

use of com.revolsys.collection.list.ListByIndexIterator in project com.revolsys.open by revolsys.

the class ModeAbstractCached method exportRecords.

@Override
public void exportRecords(final Query query, final Object target) {
    final Condition filter = query.getWhereCondition();
    final Map<? extends CharSequence, Boolean> orderBy = query.getOrderBy();
    final AbstractRecordLayer layer = getLayer();
    final Iterable<LayerRecord> records = new ListByIndexIterator<>(this.records);
    layer.exportRecords(records, filter, orderBy, target);
}
Also used : Condition(com.revolsys.record.query.Condition) ListByIndexIterator(com.revolsys.collection.list.ListByIndexIterator) AbstractRecordLayer(com.revolsys.swing.map.layer.record.AbstractRecordLayer) LayerRecord(com.revolsys.swing.map.layer.record.LayerRecord)

Example 2 with ListByIndexIterator

use of com.revolsys.collection.list.ListByIndexIterator in project com.revolsys.open by revolsys.

the class ModeAbstractCached method forEachRecord.

@Override
public void forEachRecord(final Query query, final Consumer<? super LayerRecord> action) {
    final Condition filter = query.getWhereCondition();
    final Map<? extends CharSequence, Boolean> orderBy = query.getOrderBy();
    final AbstractRecordLayer layer = getLayer();
    final Iterable<LayerRecord> records = new ListByIndexIterator<>(this.records);
    layer.forEachRecord(records, filter, orderBy, action);
}
Also used : Condition(com.revolsys.record.query.Condition) ListByIndexIterator(com.revolsys.collection.list.ListByIndexIterator) AbstractRecordLayer(com.revolsys.swing.map.layer.record.AbstractRecordLayer) LayerRecord(com.revolsys.swing.map.layer.record.LayerRecord)

Aggregations

ListByIndexIterator (com.revolsys.collection.list.ListByIndexIterator)2 Condition (com.revolsys.record.query.Condition)2 AbstractRecordLayer (com.revolsys.swing.map.layer.record.AbstractRecordLayer)2 LayerRecord (com.revolsys.swing.map.layer.record.LayerRecord)2