org.oreodata.predicates
Class Predicate

java.lang.Object
  |
  +--org.oreodata.predicates.Predicate
All Implemented Interfaces:
RecordFilter, java.io.Serializable
Direct Known Subclasses:
CompoundPredicate, SimplePredicate

public abstract class Predicate
extends java.lang.Object
implements RecordFilter

Abstract base class for database query predicates.

See Also:
Serialized Form

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

Field Detail

complement

protected Predicate complement
Constructor Detail

Predicate

public Predicate()
Method Detail

getComplement

public abstract Predicate getComplement()

sqlEquivalent

public abstract 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.

recType

public abstract 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

accept

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

Specified by:
accept in interface RecordFilter