Package org.springside.examples.showcase.entity

Examples of org.springside.examples.showcase.entity.Role


      @RequestParam(value = "roleList") List<Long> checkedRoleList, RedirectAttributes redirectAttributes) {

    // bind roleList
    user.getRoleList().clear();
    for (Long roleId : checkedRoleList) {
      Role role = new Role(roleId);
      user.getRoleList().add(role);
    }

    accountService.saveUser(user);
View Full Code Here


    return user;
  }

  public static User randomUserWithAdminRole() {
    User user = UserData.randomUser();
    Role adminRole = UserData.adminRole();
    user.getRoleList().add(adminRole);
    return user;
  }
View Full Code Here

    user.getRoleList().add(adminRole);
    return user;
  }

  public static Role adminRole() {
    Role role = new Role();
    role.setId(1L);
    role.setName("Admin");

    return role;
  }
View Full Code Here

TOP

Related Classes of org.springside.examples.showcase.entity.Role

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.