diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java index 9f3831bc1f270d155f51124ba744f17eeb1d55af..9aaa88652b9ad4998df60ac29a03368d03a63df0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java @@ -80,8 +80,6 @@ public class SecondaryEntityDAO return new SecondaryEntityDAO(query, daoFactory.getHomeDatabaseInstance()); } - private final ISecondaryEntitySetListingQuery setQuery; - private final ISecondaryEntityListingQuery query; private final DatabaseInstance databaseInstance; @@ -90,28 +88,9 @@ public class SecondaryEntityDAO final DatabaseInstancePE databaseInstancePE) { this.query = query; - this.setQuery = createSetQuery(query, databaseInstancePE.getId()); this.databaseInstance = DatabaseInstanceTranslator.translate(databaseInstancePE); } - private static ISecondaryEntitySetListingQuery createSetQuery( - ISecondaryEntityListingQuery query, long databaseInstanceId) - { - return asDatasetSetListingQuery(query); - } - - private static ISecondaryEntitySetListingQuery asDatasetSetListingQuery( - final ISecondaryEntityListingQuery query) - { - return new ISecondaryEntitySetListingQuery() - { - public Iterable<SampleReferenceRecord> getSamples(LongSet sampleIds) - { - return query.getSamples(sampleIds); - } - }; - } - public Experiment getExperiment(final long experimentId) { final ExperimentProjectGroupCodeRecord record = @@ -171,7 +150,7 @@ public class SecondaryEntityDAO public Long2ObjectMap<Sample> getSamples(LongSet sampleIds) { - final Iterable<SampleReferenceRecord> sampleRecords = setQuery.getSamples(sampleIds); + final Iterable<SampleReferenceRecord> sampleRecords = query.getSamples(sampleIds); Long2ObjectMap<Sample> result = new Long2ObjectOpenHashMap<Sample>(); for (SampleReferenceRecord record : sampleRecords) { @@ -191,6 +170,7 @@ public class SecondaryEntityDAO sample.setGroup(tryCreateGroup(record.g_code, databaseInstance)); sample.setDatabaseInstance(tryGetDatabaseInstance(record.g_code, databaseInstance)); sample.setPermId(escapeHtml(record.perm_id)); + // TODO 2009-09-25, Piotr Buczek: use container code sample.setIdentifier(escapeHtml(createIdentifier(sample).toString())); return sample; }