if (Logger.isDebugEnabled()) Logger.debug("creating " + r.toString() + "...");
if (!r.isOrientRole()){ //creates the new baasbox role
newRole = RoleDao.createRole(r.toString(), r.getInheritsFrom());
}else{ //retrieve the existing OrientDB role
newRole=r.getORole();
newRole.reload();
}
newRole.getDocument().field(FIELD_INTERNAL,true);
newRole.getDocument().field(FIELD_MODIFIABLE,false);
newRole.getDocument().field(FIELD_DESCRIPTION,r.getDescription());
newRole.getDocument().field(FIELD_ASSIGNABLE,r.isAssignable());