Class AbstractSourceItemTransformer

All Implemented Interfaces:
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.
  • Field Details

    • source

      private final Item source
    • target

      private final Item target
  • Constructor Details

    • AbstractSourceItemTransformer

      protected AbstractSourceItemTransformer​(Item source, Item target)
      Create a new instance that transforms between the given source and target item types.
  • Method Details

    • getSourceItemType

      public Item getSourceItemType()
      Description copied from interface: SourceItemTransformer
      Get the item type of the source items.
      Specified by:
      getSourceItemType in interface SourceItemTransformer
    • getTargetItemType

      public Item getTargetItemType()
      Description copied from interface: SourceItemTransformer
      Get the item type of the target items.
      Specified by:
      getTargetItemType in interface SourceItemTransformer
    • 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 than DbEngine.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.
      query - The query to execut
      parameterName - The name of the parameter to set for the values
      values - The values to use in the query
      The result of the query.idList() method