Package com.isfasiel.util.data

Examples of com.isfasiel.util.data.Data


    return path;
  }
  @RequestMapping(value="/delete.do")
  public String deleteWatch(Model model) throws Exception {
    User user = loginInfoProvider.get().currentUser();
    Data result = new Data();
    if(user != null) {
      try {
        Data param = getParam();
        param.add(0, "userIdx", user.getId());
        watchService.deleteWatch(param);
        result.add(0, "result", "OK");
        param = null;
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here


  }
 
  @RequestMapping(value="/list.do")
  public String delteWatch(Model model) throws Exception {
    User user = loginInfoProvider.get().currentUser();
    Data result = new Data();
    if(user != null) {
      try {
        Data param = getParam();
        param.add(0, "userIdx", user.getId());
        result = watchService.listWatch(param);
        param = null;
      } catch (Exception e) {
        e.printStackTrace();
        result = new Data();
        result.add(0, "result", "NO");
      }
    } else {
      result = new Data();
      result.add(0, "result", "NO");
   
    }
    addXML(model, "result", result, "watch");
    return path;
View Full Code Here

  @Resource(name="group.error")
  protected Properties groupProp;
 
 
  public Object insert(Data data) throws Exception {
    Data result = list("groupDAO.checkName", data);
    if( !result.isNull() ) {
      if("N".equals(result.getString(0, "delYn"))) {
        return groupProp.getProperty("DUPLICATED_NAME");
      }
    }
    long groupId = getSeq("SEQ_TN_GROUP");
    data.add(0, "groupId", groupId);
View Full Code Here

    insert("groupDAO.insert", data);
    return insert("groupDAO.insertMap", data);
  }
 
  public int update(Data data) throws Exception {
    Data result = list("groupDAO.checkName", data);
   
    if( !result.isNull() ) {
      if("N".equals(result.getString(0, "delYn")) ) {
        return -1;
      }
    }
    return update("groupDAO.update", data);
  }
View Full Code Here

   * @return
   * @throws Exception
   */
  @RequestMapping(value="/insert.do")
  public String insertDoc() throws Exception{
    Data param = getParam();
    Long contentId = docService.insert(param);
    linkFileMap(param, contentId);
    param = null;
    return "redirect:/app/doc/view/" + contentId;
    //return "redirect:/doc/list.do";
View Full Code Here

   * @throws Exception
   */
  @RequestMapping(value="/view/{contentId}")
  public String viewDoc(@PathVariable("contentId") Long contentId, Model model) throws Exception {
    if(contentId > 0) {
      Data param = new Data();
      param.add(0,"contentId", contentId);
      List<Data> result = docService.select(param);
      addTagView(model, result);
      model.addAttribute("param", param);
      return "doc/view";
    }
View Full Code Here

   * @throws Exception
   */
  @RequestMapping(value="/edit/{contentId}")
  public String viewEdit(@PathVariable("contentId") Long contentId, Model model) throws Exception {
    if(contentId > 0) {
      Data param = new Data();
      param.add(0, "contentId", contentId);
      List<Data> result = docService.select(param);
      addTagView(model, result);
      model.addAttribute("param", param);
     
    }
View Full Code Here

   * @return
   * @throws Exception
   */
  @RequestMapping(value="/edit.do")
  public String updateDoc(Model model) throws Exception {
    Data param = getParam();
    docService.update(param);
    linkFileMap(param);
    model.addAttribute("param", param);
    return "redirect:/app/doc/view/" + param.getString(0, "contentId");
  }
View Full Code Here

    return "redirect:/app/doc/view/" + param.getString(0, "contentId");
  }
 
  @RequestMapping(value="/delete.do")
  public String deleteDoc(Model model) throws Exception {
    Data param = getParam();
    docService.delete(param);
    model.addAttribute("param", param);
    return "redirect:/app/doc/list/" + param.getPage() + "/" + param.getPageSize();
  }
View Full Code Here

    return "redirect:/app/doc/list/" + param.getPage() + "/" + param.getPageSize();
  }
 
  @RequestMapping(value="/list/{page}/{pageSize}")
  public String listDoc(@PathVariable int page, @PathVariable int pageSize, Model model) throws Exception {
    Data param = getPageParam(page, pageSize);
    Data result = docService.list(param);
    addList(model, "result", result);
    addParam(model, param);
    return "doc/list";
    //return "redirect:/app/doc/list/" + param.getPage() + "/" + param.getPageSize();
  }
View Full Code Here

TOP

Related Classes of com.isfasiel.util.data.Data

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.