From 45ece5f84475a6be72f3ab0b482f04c80af72817 Mon Sep 17 00:00:00 2001
From: gakin <gakin>
Date: Tue, 17 Jan 2017 18:20:39 +0000
Subject: [PATCH] SSDM-4653 : V3 AS API - SampleQuery used in translators
 should use is_internal_namespace flag to differentiate internal ($-prefixed)
 properties

SVN: 37601
---
 .../server/asapi/v3/translator/sample/SampleQuery.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 e0d472bf3bf..7725c9d6277 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 "
-- 
GitLab