Package 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: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
-
Field Summary
Fields Modifier and Type Field Description private int
excludeLimit
private Restriction
filter
private int
includeLimit
private Map<Integer,Integer>
positionCount
-
Constructor Summary
Constructors Constructor Description IncludeExcludeFilter(DbControl dc, BioAssaySet bas, List<BioAssay> bioAssays, Restriction filter, Integer includeLimit, Integer excludeLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureQuery(SqlQuery query)
We need the position which is in column 2 (already selected).boolean
includeSpot(SqlResult data)
Check if a spot should be included in the filtered output or not.boolean
useIncludeSpot()
Always true.
-
-
-
Field Detail
-
filter
private final Restriction filter
-
includeLimit
private final int includeLimit
-
excludeLimit
private final int excludeLimit
-
-
Constructor Detail
-
IncludeExcludeFilter
public IncludeExcludeFilter(DbControl dc, BioAssaySet bas, List<BioAssay> bioAssays, Restriction filter, Integer includeLimit, Integer excludeLimit)
-
-
Method Detail
-
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 interfaceDynamicFilter
- Parameters:
query
- The query to configure
-
useIncludeSpot
public boolean useIncludeSpot()
Always true.- Specified by:
useIncludeSpot
in interfaceDynamicFilter
- 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 interfaceDynamicFilter
- 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.
-
-