Source:
<code>public void init() { setPackage(securityPackage); setLabel(SIMPLE_NAME); setDescription("A number of people that work together or share certain beliefs."); addAttribute(ID, ROLE_ID).setAuto(true).setVisible(false).setLabel("Identifier"); addAttribute(NAME, ROLE_LOOKUP) .setLabel("Name") .setDescription("Name of the group. Use kebab-case, e.g. my-group.") .setNillable(false) .setUnique(true) .setValidationExpression("$('name').matches(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/).value()"); addAttribute(LABEL, ROLE_LABEL, ROLE_LOOKUP).setLabel("Label").setNillable(false); getLanguageCodes() .map(languageCode -> getI18nAttributeName(LABEL, languageCode)) .forEach(this::addAttribute); addAttribute(DESCRIPTION).setLabel("Description").setDataType(TEXT); getLanguageCodes() .map(languageCode -> getI18nAttributeName(DESCRIPTION, languageCode)) .map(this::addAttribute) .forEach(attribute -> attribute.setDataType(TEXT)); addAttribute(PUBLIC) .setDataType(BOOL) .setLabel("Publicly visible") .setDescription("Indication if this group is publicly visible.") .setNillable(false) .setDefaultValue("true"); addAttribute(ROLES) .setDataType(ONE_TO_MANY) .setRefEntity(roleMetadata) .setMappedBy(roleMetadata.getAttribute(RoleMetadata.GROUP)) .setLabel("Roles") .setDescription("Roles a User can have within this Group") .setCascadeDelete(true); addAttribute(ROOT_PACKAGE) .setLabel("Root package") .setDescription("Id of the package where this Group's resources reside.") .setDataType(XREF) .setRefEntity(packageMetadata) .setNillable(false) .setReadOnly(true) <START> .setCascadeDelete(true); <END> }</code><technical_language>setUnique(true)</technical_language>

Target:
public void init() { setPackage(securityPackage); setLabel(SIMPLE_NAME); setDescription("A number of people that work together or share certain beliefs."); addAttribute(ID, ROLE_ID).setAuto(true).setVisible(false).setLabel("Identifier"); addAttribute(NAME, ROLE_LOOKUP) .setLabel("Name") .setDescription("Name of the group. Use kebab-case, e.g. my-group.") .setNillable(false) .setUnique(true) .setValidationExpression("$('name').matches(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/).value()"); addAttribute(LABEL, ROLE_LABEL, ROLE_LOOKUP).setLabel("Label").setNillable(false); getLanguageCodes() .map(languageCode -> getI18nAttributeName(LABEL, languageCode)) .forEach(this::addAttribute); addAttribute(DESCRIPTION).setLabel("Description").setDataType(TEXT); getLanguageCodes() .map(languageCode -> getI18nAttributeName(DESCRIPTION, languageCode)) .map(this::addAttribute) .forEach(attribute -> attribute.setDataType(TEXT)); addAttribute(PUBLIC) .setDataType(BOOL) .setLabel("Publicly visible") .setDescription("Indication if this group is publicly visible.") .setNillable(false) .setDefaultValue("true"); addAttribute(ROLES) .setDataType(ONE_TO_MANY) .setRefEntity(roleMetadata) .setMappedBy(roleMetadata.getAttribute(RoleMetadata.GROUP)) .setLabel("Roles") .setDescription("Roles a User can have within this Group") .setCascadeDelete(true); addAttribute(ROOT_PACKAGE) .setLabel("Root package") .setDescription("Package where this Group's resources reside.") .setDataType(XREF) .setRefEntity(packageMetadata) .setNillable(false) .setReadOnly(true) .setCascadeDelete(true) .setUnique(true); }