Skip to content
Snippets Groups Projects
Commit c0ac414a authored by buczekp's avatar buczekp
Browse files

[LMS-1772] minor improvement

SVN: 18637
parent 39ddfdae
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,14 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SampleTypePE; ...@@ -35,14 +35,14 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SampleTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.Session; import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
/** /**
*
*
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
public class SampleLoader implements ISampleLoader public class SampleLoader implements ISampleLoader
{ {
private final Session session; private final Session session;
private final IDAOFactory daoFactory; private final IDAOFactory daoFactory;
private final ICommonBusinessObjectFactory businessObjectFactory; private final ICommonBusinessObjectFactory businessObjectFactory;
public SampleLoader(Session session, IDAOFactory daoFactory, public SampleLoader(Session session, IDAOFactory daoFactory,
...@@ -51,9 +51,9 @@ public class SampleLoader implements ISampleLoader ...@@ -51,9 +51,9 @@ public class SampleLoader implements ISampleLoader
this.session = session; this.session = session;
this.daoFactory = daoFactory; this.daoFactory = daoFactory;
this.businessObjectFactory = businessObjectFactory; this.businessObjectFactory = businessObjectFactory;
} }
public List<Sample> listSamplesWithParentsByTypeAndSpace(String sampleTypeCode, String spaceCode) public List<Sample> listSamplesWithParentsByTypeAndSpace(String sampleTypeCode, String spaceCode)
{ {
ISampleLister sampleLister = businessObjectFactory.createSampleLister(session); ISampleLister sampleLister = businessObjectFactory.createSampleLister(session);
...@@ -109,13 +109,11 @@ public class SampleLoader implements ISampleLoader ...@@ -109,13 +109,11 @@ public class SampleLoader implements ISampleLoader
} }
}); });
Set<Long> filteredSampleIDs = new HashSet<Long>(); Set<Long> filteredSampleIDs = new HashSet<Long>();
Set<Long> parentIDs = new HashSet<Long>();
for (SampleRelationShipSkeleton sampleRelationShipSkeleton : relationshipSkeletons) for (SampleRelationShipSkeleton sampleRelationShipSkeleton : relationshipSkeletons)
{ {
filteredSampleIDs.add(sampleRelationShipSkeleton.getChildSampleID()); filteredSampleIDs.add(sampleRelationShipSkeleton.getChildSampleID());
parentIDs.add(sampleRelationShipSkeleton.getParentSampleID());
} }
return filteredSampleIDs; return filteredSampleIDs;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment