Examples of GroupRelation


Examples of net.yanhl.iouser.pojo.GroupRelation

            return false;
          }
        }
       
      });
      GroupRelation group = (GroupRelation) getBaseManager().get(GroupRelation.class, groupId);
      JSONObject jsonObject = JSONObject.fromObject(group, config);
      GroupRelation parentGroup = group.getParentGroup();
      jsonObject.accumulate("parentId", parentGroup.getId());
      jsonObject.accumulate("parentName", parentGroup.getGroupName());
      print(response, jsonObject.toString());
      log.info(currentUserName + ">载入分组:" + group + "");
    } catch(JSONException je) {
      je.printStackTrace();
      log.error(currentUserName + ">载入分组>解析JSON数据出错:" + je.getMessage());
View Full Code Here

Examples of net.yanhl.iouser.pojo.GroupRelation

  }
 
  public ActionForward updateGroup(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String currentUserName = null;
    GroupRelation group = null;
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      JSONObject jsonObject = readJson(request);
      group = (GroupRelation) JSONObject.toBean(jsonObject, GroupRelation.class);
     
      //获得父分组并设置父子关系
      long parentId = jsonObject.getLong("parentId");
      log.debug("分组<" + group.getGroupName() + ">,parentId=" + parentId);
      GroupRelation parentGroup = (GroupRelation) getBaseManager().get(GroupRelation.class, parentId);
     
      //获得并设置更新字段
      GroupRelation tempGroup = (GroupRelation) getBaseManager().get(GroupRelation.class, jsonObject.getLong("id"));
      tempGroup.setGroupName(group.getGroupName());
      tempGroup.setParentGroup(parentGroup);
      tempGroup.setRemark(group.getRemark());
     
      getBaseManager().update(tempGroup);
      print(response, RESBONSE_SUCCESS);
      log.info(currentUserName + ">成功修改分组[" + group + "]信息");
    } catch(JSONException je) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.