com.martiansoftware.trivialpersist.helpers
Class NullFieldFilter
java.lang.Object
com.martiansoftware.trivialpersist.helpers.NullFieldFilter
- All Implemented Interfaces:
- RecordFilter
- public class NullFieldFilter
- extends Object
- implements RecordFilter
A filter that allows the developer to quickly find records in which a
specific field is empty or non-empty.
- Author:
- mlamb
Constructor Summary |
NullFieldFilter(String fieldName,
boolean excludeNulls)
Creates a new NullFieldFilter for the specified field. |
Method Summary |
boolean |
accept(Record r)
Returns true iff the specified record should be included in the
current table select. |
NullFieldFilter
public NullFieldFilter(String fieldName,
boolean excludeNulls)
- Creates a new NullFieldFilter for the specified field.
- Parameters:
fieldName
- the name of the field to filter onexcludeNulls
- if true, this filter will exclude only records for
which the specified field is null. if false, this filter will
include only records for which the specified field is null.
accept
public boolean accept(Record r)
- 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:
r
- 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