org.apache.manifoldcf.core.interfaces
Interface ILimitChecker

All Known Implementing Classes:
Carrydown.DuplicateFinder, Carrydown.ResultDuplicateEliminator, IntrinsicLink.DuplicateFinder, JobManager.ThrottleLimit, JobQueue.DuplicateFinder

public interface ILimitChecker

This interface describes a canonical limit checker for a query. It will be used to limit the size of returned resultset by filtering entries at the time they are read from the jdbc driver. Since the logic of the implementing class is probably complex, it is not reasonable to expect classes that implement this interface to be uniquely describable to the point that hashCode() and equals() will work. However, support is provided via this interface in the chance that such methods can be written. (The definition of "sameness" is that two instances of this interface would always return the same answers given the same inputs.)


Field Summary
static java.lang.String _rcsid
           
 
Method Summary
 boolean checkContinue()
          See if we should examine another row.
 boolean checkInclude(IResultRow row)
          See if a result row should be included in the final result set.
 boolean doesCompareWork()
          See if this class can be legitimately compared against another of the same type.
 ILimitChecker duplicate()
          Create a duplicate of this class instance.
 boolean equals(java.lang.Object object)
          Compare two objects and see if equal.
 int hashCode()
          Find the hashcode for this class.
 

Field Detail

_rcsid

static final java.lang.String _rcsid
See Also:
Constant Field Values
Method Detail

doesCompareWork

boolean doesCompareWork()
See if this class can be legitimately compared against another of the same type.

Returns:
true if comparisons will ever return "true".

duplicate

ILimitChecker duplicate()
Create a duplicate of this class instance. All current state should be preserved.

Returns:
the duplicate.

hashCode

int hashCode()
Find the hashcode for this class. This will only ever be used if doesCompareWork() returns true.

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode.

equals

boolean equals(java.lang.Object object)
Compare two objects and see if equal. This will only ever be used if doesCompareWork() returns true.

Overrides:
equals in class java.lang.Object
Parameters:
object - is the object to compare against.
Returns:
true if equal.

checkInclude

boolean checkInclude(IResultRow row)
                     throws ManifoldCFException
See if a result row should be included in the final result set.

Parameters:
row - is the result row to check.
Returns:
true if it should be included, false otherwise.
Throws:
ManifoldCFException

checkContinue

boolean checkContinue()
                      throws ManifoldCFException
See if we should examine another row.

Returns:
true if we need to keep going, or false if we are done.
Throws:
ManifoldCFException