Java code to set a complex property

I have a property that can be multivalue and each value is a complex property that contains two string subproperty.

Can someone give me an example of java code to set this type of property?

0 votes

1 answers



For example: To put “wishedValue1” and “wishedValue2” into subfields “fieldName1” and “fieldName2” of “metadataName” (in “schemaPrefix”) which is complex and multivalued:

    List<Map<String, Object>> complexValuesList = new ArrayList<Map<String, Object>>();
    Map<String, Object> complexValue = new HashMap<String, Object>();
    complexValue.put("fieldName1", "wishedValue1");
    complexValue.put("fieldName2", "wishedValue2");
    customDocType.setPropertyValue("schemaPrefix:metadataName", (Serializable) complexValuesList);

You could find another example there:

0 votes