net.sf.basedb.util
Class IncludeExcludeFilter
java.lang.Object
net.sf.basedb.util.IncludeExcludeFilter
- All Implemented Interfaces:
- DynamicFilter
public class IncludeExcludeFilter
- extends Object
- implements DynamicFilter
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filter
private final Restriction filter
includeLimit
private final int includeLimit
excludeLimit
private final int excludeLimit
positionCount
private final Map<Integer,Integer> positionCount
IncludeExcludeFilter
public IncludeExcludeFilter(DbControl dc,
BioAssaySet bas,
List<BioAssay> bioAssays,
Restriction filter,
Integer includeLimit,
Integer excludeLimit)
configureQuery
public void configureQuery(SqlQuery query)
- We need the position which is in column 2 (already selected). If the limits
leave a gap we also need to know if a spot matches the filter or not.
- Specified by:
configureQuery
in interface DynamicFilter
- Parameters:
query
- The query to configure
useIncludeSpot
public boolean useIncludeSpot()
- Always true.
- Specified by:
useIncludeSpot
in interface DynamicFilter
- Returns:
- TRUE or FALSE
includeSpot
public boolean includeSpot(SqlResult data)
throws SQLException
- Check if a spot should be included in the filtered output or not.
- Specified by:
includeSpot
in interface DynamicFilter
- 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.