com.niggle.data
Interface RecordFilter
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- RecordFilter.NullFilter, RecordFilter.ClassConstraint, RecordFilter.FieldConstraint, RecordFilter.TypeConstraint, RecordFilter.UnionFilter, RecordFilter.IntersectionFilter, RecordFilter.NegationFilter
- public interface RecordFilter
- extends java.io.Serializable
An interface for objects that can filter a set of records
based on some criterion. A unary predicate that operates on
records, more formally.
- Author:
- Jonathan Revusky
Method Summary |
boolean |
accept(Record rec)
The method that determines whether the
record gets through the filter. |
java.lang.String |
sqlEquivalent()
Method that returns the SQL WHERE clause that
is the equivalent of the unary predicate that
this field represents. |
NULL_FILTER
public static final RecordFilter NULL_FILTER
accept
public boolean accept(Record rec)
- The method that determines whether the
record gets through the filter.
sqlEquivalent
public java.lang.String sqlEquivalent()
- Method that returns the SQL WHERE clause that
is the equivalent of the unary predicate that
this field represents. It is the programmer's
responsibility that this really be equivalent.
For programmer convenience, the string returned
should start with a space and then WHERE