Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.UserGroup


        Criteria criteria = createDefaultCriteria(UserGroup.class);
       
        FetchPlan fetchPlan = handleSpecificUserGroupFetchMode(criteria, params);
       
        criteria.add(Restrictions.eq("id", userGroupId));
        UserGroup userGroup = (UserGroup) criteria.uniqueResult();
        if(userGroup != null){
            userGroup.setFetchPlan(fetchPlan);
        }
        return userGroup;
    }
View Full Code Here


        Criteria criteria = createDefaultCriteria(UserGroup.class);
       
        FetchPlan fetchPlan = handleSpecificUserGroupFetchMode(criteria, params);
       
        criteria.add(Restrictions.eq("code", handleCodeValue(code)));
        UserGroup userGroup = (UserGroup) criteria.uniqueResult();
        if(userGroup != null){
            userGroup.setFetchPlan(fetchPlan);
        }
        return userGroup;
    }
View Full Code Here

        userGroup.setDateUpdate(new Date());
        if (userGroup.getId() != null) {
            if(em.contains(userGroup)){
                em.refresh(userGroup);
            }
            UserGroup mergedUserGroup = em.merge(userGroup);
            em.flush();
            return mergedUserGroup;
        } else {
            em.persist(userGroup);
            return userGroup;
View Full Code Here

            userViewBean.setDateUpdate(Constants.NOT_AVAILABLE);
        }

        final Set<UserGroup> groups = user.getGroups();
        for (Iterator<UserGroup> iteratorGroup = groups.iterator(); iteratorGroup.hasNext();) {
            UserGroup group = (UserGroup) iteratorGroup.next();
            String keyUserGroup = group.getCode();
            String valueUserGroup = group.getName();
            userViewBean.getGroups().put(keyUserGroup, valueUserGroup);

            final Set<UserRole> roles = group.getRoles();
            for (Iterator<UserRole> iteratorRole = roles.iterator(); iteratorRole.hasNext();) {
                UserRole role = (UserRole) iteratorRole.next();
                String keyUserRole = role.getCode();
                String valueUserRole = role.getName();
                userViewBean.getRoles().put(keyUserRole, valueUserRole);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.UserGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.