Search in sources :

Example 1 with MdAttributeLocalText

use of com.runwaysdk.system.metadata.MdAttributeLocalText in project geoprism-registry by terraframe.

the class LocalizeListMetadataFieldsPatch method defineAttributes.

private void defineAttributes() {
    for (int i = 0; i < newAttrs.length; ++i) {
        String newAttrName = newAttrs[i];
        MdAttributeConcreteDAO oldMdAttr = (MdAttributeConcreteDAO) MdAttributeConcreteDAO.getByKey(MasterList.CLASS + "." + oldAttrs[i]);
        MdAttributeLocalText mdAttr = new MdAttributeLocalText();
        mdAttr.setDefiningMdClass(masterlistMd);
        mdAttr.setAttributeName(newAttrName);
        mdAttr.getDisplayLabel().setLocaleMap(oldMdAttr.getDisplayLabels());
        mdAttr.apply();
    }
}
Also used : MdAttributeLocalText(com.runwaysdk.system.metadata.MdAttributeLocalText) MdAttributeConcreteDAO(com.runwaysdk.dataaccess.metadata.MdAttributeConcreteDAO)

Aggregations

MdAttributeConcreteDAO (com.runwaysdk.dataaccess.metadata.MdAttributeConcreteDAO)1 MdAttributeLocalText (com.runwaysdk.system.metadata.MdAttributeLocalText)1