Examples of BaseDTO


Examples of org.g4studio.core.metatype.impl.BaseDto

   *
   * @param pDto
   * @return
   */
  public Dto deleteSfxm(Dto pDto) {
    Dto outDto = new BaseDto();
    g4Dao.delete("Demo.deleteSfxm", pDto);
    return outDto;
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

   * 调用存储过程演示
   *
   * @return
   */
  public Dto callPrc(Dto inDto) {
    Dto prcDto = new BaseDto();
    prcDto.put("myname", inDto.getAsString("myname"));
    prcDto.put("number1", inDto.getAsBigDecimal("number1"));
    prcDto.put("number2", inDto.getAsBigDecimal("number2"));
    g4Dao.callPrc("Demo.g4_prc_demo", prcDto);
    return prcDto;
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

  /**
   * 演示声明式事务配置
   */
  public Dto doTransactionTest() {
    Dto dto = new BaseDto();
    dto.put("sxh", "BJLK1000000000935");
    dto.put("fyze", new BigDecimal(300));
    g4Dao.update("Demo.updateByjsb", dto);
    // 如果在这里制造一个异常,事务将被回滚
    dto.put("fyze", new BigDecimal(300));
    g4Dao.update("Demo.updateByjsb1", dto);
    Dto outDto = (Dto) g4Dao.queryForObject("Demo.queryBalanceInfo", dto);
    return outDto;
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

  /**
   * 客户端异常处理
   */
  public Dto doError() {
    Dto dto = new BaseDto();
    dto.put("sxh", "BJLK1000000000935");
    Dto outDto = (Dto) g4Dao.queryForObject("Demo.queryBalanceInfo1", dto);
    return outDto;
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

   * @throws Exception
   */
  public ActionForward queryAreas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = new BaseDto();
    String areacode = aForm.getTreeNodeUID4Clicked(request);
    dto.put("areacode", areacode);
    dto.put("length", areacode.length() + 2);
    List list = null;
    if (areacode.equals("00")) {
      list = g4Reader.queryForList("Demo.queryAreas4Tree4FirstLevel", dto);
    }else {
      list = g4Reader.queryForList("Demo.queryAreas4Tree", dto);
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

   * @throws Exception
   */
  public ActionForward queryAreas4CheckTree(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = new BaseDto();
    String areacode = aForm.getTreeNodeUID4Clicked(request);
    dto.put("areacode", areacode);
    dto.put("length", areacode.length() + 2);
    List list = null;
    if (areacode.equals("00")) {
      list = g4Reader.queryForList("Demo.queryAreas4Tree4FirstLevel", dto);
    }else {
      list = g4Reader.queryForList("Demo.queryAreas4Tree", dto);
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

   * @throws Exception
   */
  public ActionForward queryAreas4CheckTree2(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = new BaseDto();
    String areacode = aForm.getTreeNodeUID4Clicked(request);
    dto.put("areacode", areacode);
    dto.put("length", areacode.length() + 2);
    List list = null;
    if (areacode.equals("00")) {
      list = g4Reader.queryForList("Demo.queryAreas4Tree4FirstLevel", dto);
    }else {
      list = g4Reader.queryForList("Demo.queryAreas4Tree", dto);
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

   * @return
   * @throws Exception
   */
  public ActionForward departmentTreeInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    Dto dto = new BaseDto();
    String nodeid = request.getParameter("node");
    dto.put("parentid", nodeid);
    List deptList = g4Reader.queryForList("Demo.queryDeptItemsByDto4TreeGridDemo", dto);
    Dto deptDto = new BaseDto();
    for(int i = 0; i < deptList.size(); i++){
      deptDto = (BaseDto)deptList.get(i);
      if(deptDto.getAsString("leaf").equals(SystemConstants.LEAF_Y))
        deptDto.put("leaf", new Boolean(true));
      else
        deptDto.put("leaf", new Boolean(false));
      if(deptDto.getAsString("id").length() == 6)
        deptDto.put("expanded", new Boolean(true));
    }
    String jsonString = JsonHelper.encodeObject2Json(deptList);
    super.write(jsonString, response);
    return mapping.findForward(null);
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

 
  /**
   * 返回当前最大序列号
   */
  public long load(String pIdColumnName) throws StoreSequenceException {
    Dto dto = new BaseDto();
    dto.put("fieldname", pIdColumnName);
    dto = (BaseDto)g4Dao.queryForObject("IdGenerator.getEaSequenceByFieldName", dto);
    Long maxvalue = dto.getAsLong("maxid");
    return maxvalue.longValue();
  }
View Full Code Here

Examples of org.g4studio.core.metatype.impl.BaseDto

 
  /**
   * 写入当前生成的最大序列号值
   */
  public void  updateMaxValueByFieldName(long pMaxId, String pIdColumnName) throws StoreSequenceException {
    Dto dto = new BaseDto();
    dto.put("maxid", String.valueOf(pMaxId));
    dto.put("fieldname", pIdColumnName);
    g4Dao.update("IdGenerator.updateMaxValueByFieldName", dto);
  }
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.