com.martiansoftware.trivialpersist
Class SeriesRecordFilter

java.lang.Object
  extended bycom.martiansoftware.trivialpersist.SeriesRecordFilter
All Implemented Interfaces:
RecordFilter

public class SeriesRecordFilter
extends Object
implements RecordFilter

Provides a means to wrap multiple RecordFilters into a single RecordFilter. When filtering, each wrapped RecordFilter is executed in the order in which it was added to the SeriesRecordFilter, until one of the wrapped RecordFilters excludes a Record. As a result, any RecordFilters performing heavy pruning should be added to a SeriesRecordFilter first, and any requiring intensive CPU operations should be added last.

Author:
Marty Lamb

Constructor Summary
SeriesRecordFilter()
          Creates a new, empty SeriesRecordFilter that includes all Records.
 
Method Summary
 boolean accept(Record record)
          Returns true iff the specified record should be included in the current table select.
 SeriesRecordFilter add(RecordFilter recordFilter)
          Adds a RecordFilter to this SeriesRecordFilter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeriesRecordFilter

public SeriesRecordFilter()
Creates a new, empty SeriesRecordFilter that includes all Records.

Method Detail

add

public SeriesRecordFilter add(RecordFilter recordFilter)
Adds a RecordFilter to this SeriesRecordFilter.

Parameters:
recordFilter -
Returns:
a reference to this SeriesRecordFilter

accept

public boolean accept(Record record)
Description copied from interface: RecordFilter
Returns true iff the specified record should be included in the current table select.

Specified by:
accept in interface RecordFilter
Parameters:
record - the record to check
Returns:
true iff the specified record should be included in the current table select.
See Also:
RecordFilter.accept(Record)


Copyright © 2004, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/trivialpersist