com.revusky.niggle.data
Class RecordFilter.FieldConstraint

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

public static class RecordFilter.FieldConstraint
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 fieldName
           
 java.lang.Object value
           
 
Fields inherited from interface com.revusky.niggle.data.RecordFilter
NULL_FILTER
 
Constructor Summary
RecordFilter.FieldConstraint(java.lang.String fieldName, java.lang.Object value)
           
 
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

fieldName

public final java.lang.String fieldName

value

public final java.lang.Object value
Constructor Detail

RecordFilter.FieldConstraint

public RecordFilter.FieldConstraint(java.lang.String fieldName,
                                    java.lang.Object value)
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