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
Abstract base class for source item transformers that can be useful
for implementing some common functionality.
- Since:
- 3.5
- Author:
- Nicklas
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSourceItemTransformer
(Item source, Item target) Create a new instance that transforms between the given source and target item types. -
Method Summary
Modifier and TypeMethodDescriptionGet the item type of the source items.Get the item type of the target items.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
-
Field Details
-
source
-
target
-
-
Constructor Details
-
AbstractSourceItemTransformer
Create a new instance that transforms between the given source and target item types.
-
-
Method Details
-
getSourceItemType
Description copied from interface:SourceItemTransformer
Get the item type of the source items.- Specified by:
getSourceItemType
in interfaceSourceItemTransformer
-
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
-