Package org.butor.json

Examples of org.butor.json.CommonRequestArgs


   */
  @Override
  public void save() {
    if (!changePersisted) {
      for (Entry<AttributeKey, AttrSetWithAction> entry  : attributeMap.entrySet()) {
        CommonRequestArgs request = createCommonRequestArgs();
        AttributeKey ak = entry.getKey();
        AttrSetWithAction attrSetAction = entry.getValue();
        AttrSet as  = attrSetAction.attrSet;
        switch (attrSetAction.action) {
        case ADD:
View Full Code Here


  private AttrSetDao dao;
 
 
  @Override
  public void getAttrSet(final Context ctx, final AttrSetCriteria criteria) {
    CommonRequestArgs cra = ctx.getRequest();
    ResponseHandler<Object> rh = ctx.getResponseHandler();
    List<AttrSet> list = dao.getAttrSet(criteria, cra);
    rh.addRow(list);
  }
View Full Code Here

  }
 
  @Override
  @Transactional
  public void updateAttrSet(final Context ctx, final List<AttrSet> attrSet) {
    CommonRequestArgs cra = ctx.getRequest();
    ResponseHandler<Object> rh = ctx.getResponseHandler();
    for (AttrSet a : attrSet) {
      AttrSet updated = dao.updateAttrSet(a, cra);
      rh.addRow(updated);
    }
View Full Code Here

  }
 
  @Override
  @Transactional
  public void insertAttrSet(final Context ctx, final List<AttrSet> attrSet) {
    CommonRequestArgs cra = ctx.getRequest();
    ResponseHandler<Object> rh = ctx.getResponseHandler();
    for (AttrSet a : attrSet) {
      AttrSet inserted = dao.insertAttrSet(a, cra);
      rh.addRow(inserted);
    }
View Full Code Here

  }
 
  @Override
  @Transactional
  public void deleteAttrSet(final Context ctx, final List<AttrSet> attrSet) {
    CommonRequestArgs cra = ctx.getRequest();
    for (AttrSet a : attrSet) {
      dao.deleteAttrSet(AttrSetCriteria.valueOf(a.getType(),a.getId(),a.getK1(), a.getK2()), cra);
    }
  }
View Full Code Here

    // return only "attr set" of type "code set"
    AttrSetCriteria asc = new AttrSetCriteria();
    asc.setType("codeset");
    asc.setId(args.getId());
    asc.setK2(args.getLang());
    CommonRequestArgs cra = ctx.getRequest();
    ResponseHandler<Object> rh = ctx.getResponseHandler();
    List<AttrSet> list = _dao.getAttrSet(asc, cra);
    rh.addRow(list);
  }
View Full Code Here

      ApplicationException.exception(DAOMessageID.UPDATE_FAILURE.getMessage());
    }
  }
  @Override
  public Object getRowForHistory(MapSqlParameterSource params) {
    CommonRequestArgs cra = new CommonRequestArgs();
    cra.setUserId((String)params.getValue("userId"));
    cra.setLang((String)params.getValue("lang"));
    cra.setReqId((String)params.getValue("reqId"));
    cra.setSessionId((String)params.getValue("sessionId"));
    String id = (String)params.getValue("id");

    return readUser(id, null, cra);
  }
View Full Code Here

    }
  }

  @Override
  public Object getRowForHistory(MapSqlParameterSource params) {
    CommonRequestArgs cra = new CommonRequestArgs();
    cra.setUserId((String)params.getValue("userId"));
    cra.setLang((String)params.getValue("lang"));
    cra.setReqId((String)params.getValue("reqId"));
    cra.setSessionId((String)params.getValue("sessionId"));
    long firmId = (Long)params.getValue("firmId");

    return readFirm(firmId, null, null, null, cra);
  }
View Full Code Here

      ctx_.getResponseHandler().addMessage(new Message(0, MessageType.ERROR, msg));
      return;
    }

    try {
      final CommonRequestArgs cr = new CommonRequestArgs();
      cr.setLang(req.getLang());
      cr.setReqId(req.getReqId());
      cr.setSessionId(req.getSessionId());
      cr.setUserId(req.getUserId());
      Context ctx = new Context() {
        @Override
        public ResponseHandler<Object> getResponseHandler() {
          return ctx_.getResponseHandler();
        }
View Full Code Here

        return commonRequestArgs;
      }
    };
  }
  public static CommonRequestArgs getCommonRequestArgs(String commonRequestJSON) {
    CommonRequestArgs commonRequestArgs = new JsonHelper().deserialize(commonRequestJSON, CommonRequestArgs.class);
    return commonRequestArgs;
  }
View Full Code Here

TOP

Related Classes of org.butor.json.CommonRequestArgs

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.