Query hibQuery = session.createQuery(" from SbiExtRoles where extRoleId = " + role.getId());
List hibList = hibQuery.list();
if(!hibList.isEmpty()) {
return;
}
SbiExtRoles hibRole = new SbiExtRoles(role.getId());
hibRole.setCode(role.getCode());
hibRole.setDescr(role.getDescription());
hibRole.setName(role.getName());
SbiDomains roleType = (SbiDomains)session.load(SbiDomains.class, role.getRoleTypeID());
hibRole.setRoleType(roleType);
hibRole.setRoleTypeCode(role.getRoleTypeCD());
hibRole.setIsAbleToSaveIntoPersonalFolder(new Boolean(role.isAbleToSaveIntoPersonalFolder()));
hibRole.setIsAbleToSaveRememberMe(new Boolean(role.isAbleToSaveRememberMe()));
hibRole.setIsAbleToSeeMetadata(new Boolean(role.isAbleToSeeMetadata()));
hibRole.setIsAbleToSeeNotes(new Boolean(role.isAbleToSeeNotes()));;
hibRole.setIsAbleToSeeSnapshots(new Boolean(role.isAbleToSeeSnapshots()));
hibRole.setIsAbleToSeeSubobjects(new Boolean(role.isAbleToSeeSubobjects()));
hibRole.setIsAbleToSeeViewpoints(new Boolean(role.isAbleToSeeViewpoints()));
hibRole.setIsAbleToSendMail(new Boolean(role.isAbleToSendMail()));
hibRole.setIsAbleToBuildQbeQuery(role.isAbleToBuildQbeQuery());
session.save(hibRole);
tx.commit();
} catch (Exception e) {
logger.error("Error while inserting role into export database " , e);
throw new EMFUserError(EMFErrorSeverity.ERROR, "8005", "component_impexp_messages");