|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IReadFilter
This interface represents the read filters that can be used in Mr. Persister.
A read filter is used to limit the amount of records read, by having the filter
not accept any records that are not desired to be read. This can be used to
read pages of objects, for instance object 10-20 of a total ResultSet
of 50 records.
It can also be used to just filter the ResultSet
further than was possible (or hard to do) in the SQL generating the ResultSet
in the first place. Also read filters can be combined, making it easier to have
filters that can be switched on and off. Easier than having to generate the SQL
for those kinds of on/off filterings.
Read filters are used when calling the functions of the object reader.
Method Summary | |
---|---|
boolean |
accept(java.sql.ResultSet result)
Returns true if the filter can accept the record at the current position of the result set as part of the objects read. |
void |
acceptedByAllFilters(boolean wasAcceptedByAllFilters)
If the filter is used in a combined filter, this filter can be told whether all other filters accepted this record, or not. |
boolean |
acceptMore()
Returns true if the filter will accept anymore records at all. |
void |
clear()
This method is called when all reading is done. |
void |
init(java.sql.ResultSet result)
Called by the object reader before reading starts taking place. |
Method Detail |
---|
void init(java.sql.ResultSet result) throws java.sql.SQLException, PersistenceException
result
- The ResultSet to initialize.
java.sql.SQLException
PersistenceException
boolean accept(java.sql.ResultSet result) throws java.sql.SQLException, PersistenceException
result
- The ResultSet instance apply the filter filter to.
java.sql.SQLException
PersistenceException
boolean acceptMore()
void acceptedByAllFilters(boolean wasAcceptedByAllFilters)
wasAcceptedByAllFilters
- Will be set to true if all filters in a combined filter
accepted the current record. Will be set to false if just one single filter do
not accept the current record.void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |