Skip to content
Snippets Groups Projects
Commit 45ece5f8 authored by gakin's avatar gakin
Browse files

SSDM-4653 : V3 AS API - SampleQuery used in translators should use...

SSDM-4653 : V3 AS API - SampleQuery used in translators should use is_internal_namespace flag to differentiate internal ($-prefixed) properties

SVN: 37601
parent 8c1a2004
No related branches found
No related tags found
No related merge requests found
......@@ -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 "
......
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