From c8c4009aee560c57fe774cc79a5a8dd7dab9fb07 Mon Sep 17 00:00:00 2001 From: buczekp <buczekp> Date: Fri, 18 Jun 2010 11:06:04 +0000 Subject: [PATCH] minor: small query readability improvements SVN: 16583 --- .../server/business/bo/samplelister/ISampleListingQuery.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java index 54eae526952..4507cb82e33 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java @@ -217,11 +217,12 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ @Select(sql = "select s.id, s.perm_id, s.code, s.expe_id, s.grou_id, s.dbin_id, " + " s.registration_timestamp, s.pers_id_registerer, " + " s.samp_id_generated_from, s.samp_id_part_of, s.saty_id, s.inva_id " - + " from samples s where s.saty_id=?{1} and id in (" + + " from samples s where s.saty_id=?{1} and id s.in (" + " select samp_id from sample_properties sp where sp.stpt_id in (" + " select id from sample_type_property_types stpt where stpt.prty_id = " + " (select id from property_types where code=?{2})" - + " ) and value=?{3}" + " ) and not id = any(?{4})", parameterBindings = + + " ) and value=?{3} " + + " ) and not id = any(?{4})", parameterBindings = { TypeMapper.class, TypeMapper.class, TypeMapper.class, LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<SampleRecord> getSamplesWithPropertyValue(long sampleTypeId, String propertyTypeCode, String propertyValue, LongSet sampleIds); -- GitLab