public int updateTargetList(TargetList targetList) throws DataAccessException {
   String sql = QueryUtil.getStringQuery("targetlist_sql", "target.targetui.update");
   Map<String, Object> param = new HashMap<String, Object>();
   param.put("targetID", targetList.getTargetID());
   param.put("targetName", targetList.getTargetName());
   param.put("description", targetList.getDescription());
   param.put("shareType", targetList.getShareType());
   param.put("shareID", targetList.getShareID());
   param.put("targetType", targetList.getTargetType());
   param.put("dbID", targetList.getDbID());
   param.put("queryText", targetList.getQueryText());
   param.put("countQuery", targetList.getCountQuery());
   param.put("targetCount", targetList.getTargetCount());
   param.put("targetGroupID", targetList.getTargetGroupID());
   return getSimpleJdbcTemplate().update(sql, param);
 }
  /**
   * 대상자를 보여준다.
   *
   * @param targetID
   * @return
   * @throws DataAccessException
   */
  public TargetList viewTargetList(int targetID) throws DataAccessException {
    TargetList targetList = new TargetList();
    Map<String, Object> resultMap = null;

    String sql = QueryUtil.getStringQuery("targetlist_sql", "target.targetui.viewtargetinfo");

    Map<String, Object> param = new HashMap<String, Object>();
    param.put("targetID", new Integer(targetID));

    // SQL문이 실행된다.
    try {
      resultMap = getSimpleJdbcTemplate().queryForMap(sql, param);
    } catch (EmptyResultDataAccessException e1) {
    }

    if (resultMap != null) {
      targetList.setTargetID(Integer.parseInt(String.valueOf(resultMap.get("targetID"))));
      targetList.setTargetName((String) resultMap.get("targetName"));
      targetList.setDescription((String) resultMap.get("description"));
      targetList.setUserID((String) resultMap.get("userID"));
      targetList.setGroupID((String) resultMap.get("groupID"));
      targetList.setBookMark((String) resultMap.get("bookMark"));
      targetList.setShareType((String) resultMap.get("shareType"));
      targetList.setShareID((String) resultMap.get("shareID"));
      targetList.setTargetType((String) resultMap.get("targetType"));
      targetList.setTargetGroupID(Integer.parseInt(String.valueOf(resultMap.get("targetGroupID"))));
    }
    return targetList;
  }
 /**
  * 대상자그룹등록
  *
  * @param targetList
  * @return
  * @throws DataAccessException
  */
 public int insertTargetList(TargetList targetList) throws DataAccessException {
   String sql = QueryUtil.getStringQuery("targetlist_sql", "target.targetui.insert");
   Map<String, Object> param = new HashMap<String, Object>();
   param.put("targetName", targetList.getTargetName());
   param.put("description", targetList.getDescription());
   param.put("userID", targetList.getUserID());
   param.put("bookMark", targetList.getBookMark());
   param.put("shareType", targetList.getShareType());
   param.put("shareID", targetList.getShareID());
   param.put("targetType", targetList.getTargetType());
   param.put("upload_key", targetList.getUploadKey());
   param.put("dbID", targetList.getDbID());
   param.put("queryText", targetList.getQueryText());
   param.put("countQuery", targetList.getCountQuery());
   param.put("targetCount", targetList.getTargetCount());
   param.put("directText", targetList.getDirectText());
   param.put("state", targetList.getState());
   param.put("sendedDate", targetList.getSendedDate());
   param.put("successYN", targetList.getSuccessYN());
   param.put("openYN", targetList.getOpenYN());
   param.put("clickYN", targetList.getClickYN());
   param.put("rejectcallYN", targetList.getRejectcallYN());
   param.put("connectedDbID", targetList.getConnectedDbID());
   param.put("massmailGroupID", targetList.getMassmailGroupID());
   param.put("targetGroupID", targetList.getTargetGroupID());
   param.put("targetUIID", targetList.getTargetUIID());
   return getSimpleJdbcTemplate().update(sql, param);
 }