org.oreodata.predicates
Class TypeFilter

java.lang.Object
  |
  +--org.oreodata.predicates.TypeFilter
All Implemented Interfaces:
RecordFilter, java.io.Serializable

public class TypeFilter
extends java.lang.Object
implements RecordFilter

A simple RecordFilter implementation that simply makes sure that a record is of a given type.

See Also:
Serialized Form

Constructor Summary
TypeFilter(java.lang.String recType)
           
 
Method Summary
 boolean accept(Record rec)
          Does this record meet the filter criterion?
 java.lang.String recType()
          says what kind of record type we are looking for, i.e.
 java.lang.String sqlEquivalent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFilter

public TypeFilter(java.lang.String recType)
Method Detail

accept

public boolean accept(Record rec)
Description copied from interface: RecordFilter
Does this record meet the filter criterion?

Specified by:
accept in interface RecordFilter

recType

public java.lang.String recType()
Description copied from interface: RecordFilter
says what kind of record type we are looking for, i.e. the filter will only return results of a certain record type. If this returns null, it means that we could have heterogeneous results.

Specified by:
recType in interface RecordFilter

sqlEquivalent

public java.lang.String sqlEquivalent()
Specified by:
sqlEquivalent in interface RecordFilter
Returns:
The SQL SELECT command that is the equivalent to this. A null value would indicate that we don't know the SQL command. In that case, the filter will have to be applied in-memory.