2.17.2: 2011-06-17

net.sf.basedb.util.biomaterial
Class PooledParentsTransformer<I extends MeasuredBioMaterial>

java.lang.Object
  extended by net.sf.basedb.util.biomaterial.PooledParentsTransformer<I>
All Implemented Interfaces:
CollectionTransformer<I,I>

public class PooledParentsTransformer<I extends MeasuredBioMaterial>
extends Object
implements CollectionTransformer<I,I>

Collection transformer that given a collection of (pooled) biomaterials finds all parents (of the same type).

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2009-01-13 09:20:26 +0100 (Tue, 13 Jan 2009) $

Field Summary
private  boolean copySources
           
private  DbControl dc
           
private  ItemQuery<I> query
           
 
Constructor Summary
PooledParentsTransformer(DbControl dc, boolean copySources, ItemQuery<I> query)
           
 
Method Summary
 int transform(Collection<? extends I> source, Collection<? super I> destination)
          Transform the source collection and store the changes in the destination collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dc

private final DbControl dc

query

private final ItemQuery<I extends MeasuredBioMaterial> query

copySources

private final boolean copySources
Constructor Detail

PooledParentsTransformer

public PooledParentsTransformer(DbControl dc,
                                boolean copySources,
                                ItemQuery<I> query)
Method Detail

transform

public int transform(Collection<? extends I> source,
                     Collection<? super I> destination)
Description copied from interface: CollectionTransformer
Transform the source collection and store the changes in the destination collection.

Specified by:
transform in interface CollectionTransformer<I extends MeasuredBioMaterial,I extends MeasuredBioMaterial>
Parameters:
source - The source collection
destination - The destination collection
Returns:
The number of elements affected in the destination collection. Note! This value may have a different meaning depending on the implementor. For example, some implementor may add elements while other implementor may remove elements. A return value of 0 should always indicate that no modifications has been made to the destination collection.

2.17.2: 2011-06-17