@@ -0,0 +1,2477 @@
+/**%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A * you may not use this file except in compliance with the License.%0D%0A * You may obtain a copy of the License at%0D%0A *%0D%0A * http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A * See the License for the specific language governing permissions and%0D%0A * limitations under the License.%0D%0A */%0D%0Apackage io.horizondb.model.core.iterators;%0D%0A%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport io.horizondb.model.core.Record;%0D%0Aimport io.horizondb.model.core.RecordIterator;%0D%0Aimport io.horizondb.model.core.records.FieldFilter;%0D%0A%0D%0A/**%0D%0A * %3Ccode%3ERecordFilter%3C/code%3E decorator that filter the fields of the records returned by the decorated iterator.%0D%0A */%0D%0Apublic final class FieldFilteringIterator extends AbstractRecordIterator%3CRecord%3E %7B%0D%0A%0D%0A    /**%0D%0A     * The decorated iterator.%0D%0A     */%0D%0A    private final RecordIterator iterator;%0D%0A%0D%0A    /**%0D%0A     * The record filters.%0D%0A     */%0D%0A    private final FieldFilter%5B%5D filters;%0D%0A%0D%0A    /**%0D%0A     * Creates a new %3Ccode%3EFieldFilteringIterator%3C/code%3E that filter the records returned by the specified iterator.%0D%0A     *%0D%0A     * @param iterator the iterator for which the fields must be filtered%0D%0A     * @param filters the field filters%0D%0A     */%0D%0A    public FieldFilteringIterator(RecordIterator iterator, FieldFilter%5B%5D filters) %7B%0D%0A        this.iterator = iterator;%0D%0A        this.filters = filters;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * %7B@inheritDoc%7D%0D%0A     */%0D%0A    @Override%0D%0A    public void close() throws IOException %7B%0D%0A        this.iterator.close();%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * %7B@inheritDoc%7D%0D%0A     */%0D%0A    @Override%0D%0A    protected void computeNext() throws IOException %7B%0D%0A%0D%0A        if (this.iterator.hasNext()) %7B%0D%0A%0D%0A            Record record = this.iterator.next();%0D%0A            setNext(filterFieldsIfNeeded(record));%0D%0A%0D%0A        %7D else %7B%0D%0A            done();%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Filters the fields if needed.%0D%0A     *%0D%0A     * @param record the record for which some fields might need to be filtered%0D%0A     * @return a record%0D%0A     */%0D%0A    private Record filterFieldsIfNeeded(Record record) %7B%0D%0A        FieldFilter filter = this.filters%5Brecord.getType()%5D;%0D%0A        if (filter == null) %7B%0D%0A            return record;%0D%0A        %7D%0D%0A        return filter.wrap(record);%0D%0A    %7D%0D%0A%7D%0D%0A

Add missing class