2.17.2: 2011-06-17

net.sf.basedb.util
Interface DynamicFilter

All Known Implementing Classes:
IncludeExcludeFilter

public interface DynamicFilter

This interface is used together with the BioAssaySetFilterUtil class to help a plugin filter the data of a bioassay set. A plugin must supply an implementation of this interface to be able to use the BioAssaySetFilterUtil.createFilteredBioAssaySet(DbControl, BioAssaySet, List, Job, DynamicFilter, ProgressReporter) method.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Method Summary
 void configureQuery(SqlQuery query)
          Configure the query before it is used.
 boolean includeSpot(SqlResult data)
          Check if a spot should be included in the filtered output or not.
 boolean useIncludeSpot()
          If the includeSpot method must be called for each spot or not.
 

Method Detail

configureQuery

void configureQuery(SqlQuery query)
Configure the query before it is used. This includes selecting any columns that is needed by the includeSpot(SqlResult) method later and joining related tables (ie. raw data, reporter) that is needed by the filter.

Parameters:
query - The query to configure

useIncludeSpot

boolean useIncludeSpot()
If the includeSpot method must be called for each spot or not. If FALSE is returned, all rows that are returned by the query are included in the filtered bioassay set.

Returns:
TRUE or FALSE

includeSpot

boolean includeSpot(SqlResult data)
                    throws SQLException
Check if a spot should be included in the filtered output or not.

Parameters:
data - The current data row to check
Returns:
TRUE if the spot passed the filter, FALSE otherwise
Throws:
SQLException - If running SQL statement fails.

2.17.2: 2011-06-17