protected Map<String, String> obtainRole(IUser user) {
Map<String, String> mRoles = new HashMap<String, String>();
List<IRole> roles = (List<IRole>) userDao.getRoleByUser(user);
if (roles != null) {
for (int i = 0; i < roles.size(); i++) {
IRole role = roles.get(i);
mRoles.put(role.getCode(), role.getName());
}
}
return mRoles;
}