Object existingRoleObj = impManager.getExistingObject(new Integer(roleAssociateId), SbiExtRoles.class);
Object exportedRoleObj = impManager.getExportedObject(new Integer(expRoleId), SbiExtRoles.class);
if( (existingRoleObj!=null) && (exportedRoleObj!=null) ) {
SbiExtRoles existingRole = (SbiExtRoles)existingRoleObj;
SbiExtRoles exportedRole = (SbiExtRoles)exportedRoleObj;
UserAssociationsKeeper usrAssKeep = impManager.getUserAssociation();
String expRoleName = exportedRole.getName();
String exiRoleName = existingRole.getName();
usrAssKeep.recordRoleAssociation(expRoleName, exiRoleName);
} else {
throw new Exception("hibernate object of existing or exported role not recovered");
}
} catch (Exception e) {
logger.error("Error while recording user role association", e);