Package net.sf.basedb.util.listable
Class AbstractSourceItemTransformer
- java.lang.Object
-
- net.sf.basedb.util.listable.AbstractSourceItemTransformer
-
- All Implemented Interfaces:
SourceItemTransformer
- Direct Known Subclasses:
BioSourceToSampleTransformer
,CollectedExtractsToDerivedBioAssayTransformer
,CollectedExtractsToRawBioAssayTransformer
,CollectExtracts.CollectChildren
,CollectExtracts.CollectFromDerivedBioAssays
,CollectExtracts.CollectFromExtracts
,CollectExtracts.CollectFromRawBioAssays
,CollectExtracts.CollectParents
,CollectExtracts.ResetCollected
,DerivedBioAssayToChildDerivedBioAssayTransformer
,DerivedBioAssayToParentDerivedBioAssayTransformer
,DerivedBioAssayToPhysicalBioAssayTransformer
,DerivedBioAssayToRawBioAssayTransformer
,ExtractToChildExtractTransformer
,ExtractToParentExtractTransformer
,ExtractToPhysicalBioAssayTransformer
,ExtractToSampleTransformer
,PhysicalBioAssayToDerivedBioAssayTransformer
,PhysicalBioAssayToExtractTransformer
,RawBioAssayToDerivedBioAssayTransformer
,RestrictionTransformer
,SampleToBioSourceTransformer
,SampleToChildSampleTransformer
,SampleToExtractTransformer
,SampleToParentSampleTransformer
public abstract class AbstractSourceItemTransformer extends Object implements SourceItemTransformer
Abstract base class for source item transformers that can be useful for implementing some common functionality.- Since:
- 3.5
- Author:
- Nicklas
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSourceItemTransformer(Item source, Item target)
Create a new instance that transforms between the given source and target item types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Item
getSourceItemType()
Get the item type of the source items.Item
getTargetItemType()
Get the item type of the target items.protected Set<Integer>
safeIdList(DbControl dc, ItemQuery<?> query, String parameterName, Set<Integer> values)
Safely execute the query even if the number of values in the 'values' set is higher thanDbEngine.getMaxParametersInQuery()
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.util.listable.SourceItemTransformer
transform
-
-
-
-
Method Detail
-
getSourceItemType
public Item getSourceItemType()
Description copied from interface:SourceItemTransformer
Get the item type of the source items.- Specified by:
getSourceItemType
in interfaceSourceItemTransformer
-
getTargetItemType
public Item getTargetItemType()
Description copied from interface:SourceItemTransformer
Get the item type of the target items.- Specified by:
getTargetItemType
in interfaceSourceItemTransformer
-
safeIdList
protected Set<Integer> safeIdList(DbControl dc, ItemQuery<?> query, String parameterName, Set<Integer> values)
Safely execute the query even if the number of values in the 'values' set is higher thanDbEngine.getMaxParametersInQuery()
. In this case, the values will be divided into subsets and the result of the query is merged in memory. It is important that the query is such that executing it multiple times with different subsets return the same result as if it was only executed a single time with the complete set.- Parameters:
query
- The query to executparameterName
- The name of the parameter to set for the valuesvalues
- The values to use in the query- Returns:
- The result of the query.idList() method
-
-