com.revusky.niggle.data
Class RecordFilter.TypeConstraint

java.lang.Object
  |
  +--com.revusky.niggle.data.RecordFilter.TypeConstraint
All Implemented Interfaces:
RecordFilter, java.io.Serializable
Enclosing class:
RecordFilter

public static class RecordFilter.TypeConstraint
extends java.lang.Object
implements RecordFilter

See Also:
Serialized Form

Inner classes inherited from class com.revusky.niggle.data.RecordFilter
RecordFilter.ClassConstraint, RecordFilter.FieldConstraint, RecordFilter.IntersectionFilter, RecordFilter.NegationFilter, RecordFilter.NullFilter, RecordFilter.TypeConstraint, RecordFilter.UnionFilter
 
Field Summary
 java.lang.String type
           
 
Fields inherited from interface com.revusky.niggle.data.RecordFilter
NULL_FILTER
 
Constructor Summary
RecordFilter.TypeConstraint(java.lang.String type)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public final java.lang.String type
Constructor Detail

RecordFilter.TypeConstraint

public RecordFilter.TypeConstraint(java.lang.String type)
Parameters:
type - The type of record to accept
Method Detail

accept

public boolean accept(Record rec)
Description copied from interface: RecordFilter
The method that determines whether the record gets through the filter.
Specified by:
accept in interface RecordFilter

sqlEquivalent

public java.lang.String sqlEquivalent()
Description copied from interface: RecordFilter
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
Specified by:
sqlEquivalent in interface RecordFilter