newMDerattrTemplates.add(mDerattrTemplate);
}
//Create virtual attributes templates
for (AbstractVirAttr mVirAttr : membership.getVirAttrs()) {
final MVirAttrTemplate mVirattrTemplate = new MVirAttrTemplate();
mVirattrTemplate.setOwner(membership.getSyncopeRole());
final String virSchemaName = jdbcTemplate.queryForObject(
"SELECT VIRTUALSCHEMA_NAME FROM MVirAttr WHERE id = ?;", String.class, mVirAttr.getId());
mVirattrTemplate.setSchema(virSchemaDAO.find(virSchemaName, MVirSchema.class));
newMVirattrTemplates.add(mVirattrTemplate);
}
membership.setAttrs(newMattrs);
membership.setDerAttrs(newMDerattrs);
membership.setVirAttrs(newMVirattrs);