diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/sample/SampleQuery.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/sample/SampleQuery.java index e0d472bf3bfea6e2e27e2dcc96ec88abe7c60077..7725c9d62772e57d4cf25bfd0c9c42fd9bbf3376 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/sample/SampleQuery.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/sample/SampleQuery.java @@ -61,7 +61,7 @@ public interface SampleQuery extends ObjectQuery public List<SampleTypeBaseRecord> getTypes(LongSet sampleTypeIds); // PropertyQueryGenerator was used to generate this query - @Select(sql = "select p.samp_id as objectId, case pt.is_managed_internally when FALSE then pt.code else '$' || pt.code end as propertyCode, p.value as propertyValue, m.code as materialPropertyValueCode, mt.code as materialPropertyValueTypeCode, cvt.code as vocabularyPropertyValue " + @Select(sql = "select p.samp_id as objectId, case pt.is_internal_namespace when FALSE then pt.code else '$' || pt.code end as propertyCode, p.value as propertyValue, m.code as materialPropertyValueCode, mt.code as materialPropertyValueTypeCode, cvt.code as vocabularyPropertyValue " + "from sample_properties p " + "left join materials m on p.mate_prop_id = m.id " + "left join controlled_vocabulary_terms cvt on p.cvte_id = cvt.id " @@ -72,7 +72,7 @@ public interface SampleQuery extends ObjectQuery public List<PropertyRecord> getProperties(LongSet sampleIds); // PropertyQueryGenerator was used to generate this query - @Select(sql = "select p.samp_id as objectId, case pt.is_managed_internally when FALSE then pt.code else '$' || pt.code end as propertyCode, p.mate_prop_id as propertyValue " + @Select(sql = "select p.samp_id as objectId, case pt.is_internal_namespace when FALSE then pt.code else '$' || pt.code end as propertyCode, p.mate_prop_id as propertyValue " + "from sample_properties p " + "join sample_type_property_types etpt on p.stpt_id = etpt.id " + "join property_types pt on etpt.prty_id = pt.id " @@ -80,7 +80,7 @@ public interface SampleQuery extends ObjectQuery public List<MaterialPropertyRecord> getMaterialProperties(LongSet sampleIds); // PropertyQueryGenerator was used to generate this query - @Select(sql = "select ph.samp_id as objectId, ph.pers_id_author as authorId, case pt.is_managed_internally when FALSE then pt.code else '$' || pt.code end as propertyCode, ph.value as propertyValue, ph.material as materialPropertyValue, ph.vocabulary_term as vocabularyPropertyValue, ph.valid_from_timestamp as validFrom, ph.valid_until_timestamp as validTo " + @Select(sql = "select ph.samp_id as objectId, ph.pers_id_author as authorId, case pt.is_internal_namespace when FALSE then pt.code else '$' || pt.code end as propertyCode, ph.value as propertyValue, ph.material as materialPropertyValue, ph.vocabulary_term as vocabularyPropertyValue, ph.valid_from_timestamp as validFrom, ph.valid_until_timestamp as validTo " + "from sample_properties_history ph " + "join sample_type_property_types etpt on ph.stpt_id = etpt.id " + "join property_types pt on etpt.prty_id = pt.id "