Package com.sogou.qadev.service.cynthia.dao

Examples of com.sogou.qadev.service.cynthia.dao.DataAccessSessionMySQL


        templateId = XMLUtil.getAttribute(templateNode, "id");
      }
    }
   
    sql = getQuerySql(sql, pageNumber, lineAccount, sort, dir , templateId);
    dataList = new DataAccessSessionMySQL().queryDatas(sql, false , null);
   
    return dataList.toArray(new Data[dataList.size()]);
  }
View Full Code Here


             
              UUID dataId = task.getSingleReference(field.getId());
             
              if(dataId != null)
              {
                String[] titles = new DataAccessSessionMySQL().queryFieldByIds(new UUID[]{dataId} , "title" , null);
                if (titles != null && titles.length > 0) {
                  fieldShowValue =  titles[0];
                }
              }
            }
            else
            {
              UUID[] dataIdArray = task.getMultiReference(field.getId());
              StringBuffer valueStrb = new StringBuffer();
              if(dataIdArray != null && dataIdArray.length > 0){
                String[] titles = new DataAccessSessionMySQL().queryFieldByIds(dataIdArray, "title" , null);
                for(String title : titles){
                  if(valueStrb.length() > 0)
                      valueStrb.append(",");
                  valueStrb.append("[").append(title).append("]");
                }
View Full Code Here

    for (Stat endStat: flow.getEndStats()) {
      statsBuffer.append(statsBuffer.length() >0 ? " and " :"").append(" statusId != ").append(endStat.getId().getValue());
    }
    sqlBuffer.append(" and (").append(statsBuffer.toString()).append(")");

    List<Data> allDatas = new DataAccessSessionMySQL().queryDatas(sqlBuffer.toString(), false, template.getId());
    return allDatas;
  }
View Full Code Here

   
    Set<StatisticField> allFieldSet = new HashSet<BugStatisticController.StatisticField>();
   
    String taskBugColName = FieldNameCache.getInstance().getFieldName(taskBugFieldStr, templateIdStr);
   
    String [] allBugArr = new DataAccessSessionMySQL().queryFieldByTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr), taskBugColName);
   
    Template bugTemplate = null;
    if (allBugArr != null) {
      for (String bugIds : allBugArr) {
        if (bugTemplate == null) {
View Full Code Here

    String templateIdStr = request.getParameter("templateId");
    if (templateIdStr == null || templateIdStr.equals("")) {
      return "";
    }
   
    Map<String, String> idAndTitleMap = new DataAccessSessionMySQL().queryIdAndFieldOfTemplate(templateIdStr, "title");
    String jsonString =  JSONArray.toJSONString(idAndTitleMap);
    return jsonString;
  }
View Full Code Here

   * @throws Exception
   */
  @ResponseBody
  @RequestMapping("/getTemplateDatas.do")
  public String getTempalteDatas(@RequestParam("templateId") String templateId) throws Exception {
    Map<String, String> templateIdTitleMap = new DataAccessSessionMySQL().queryIdAndFieldOfTemplate(templateId, "title");
   
    List<DataVO> templateDataList = new ArrayList<DataVO>();
    for(String dataId : templateIdTitleMap.keySet())
    {
      DataVO dataVO = new DataVO();
View Full Code Here

    ErrorCode errorCode = ErrorCode.success;
    boolean isSuccess = true;
    for(DataAccessEntry<Data> entry : dataStatus.values())
    {
      if(entry.getAction().equals(DataAccessAction.delete)){
        isSuccess = new DataAccessSessionMySQL().remove(new UUID[]{entry.getData().getId()});
        updateCache(DataAccessAction.delete, entry.getData().getId().getValue(), entry.getData());//删除可以不用事务
        //删除标签中数据
        deleteTagData("", new String[]{entry.getData().getId().getValue()});
      }else if(entry.getAction().equals(DataAccessAction.insert)){
        isSuccess = new DataAccessSessionMySQL().add(entry.getData())//插入和更新必须等提交成功后才更新缓存
      }else if (entry.getAction().equals(DataAccessAction.update)) {
        isSuccess =new DataAccessSessionMySQL().modify(entry.getData());
        if(isSuccess)
          updateCache(DataAccessAction.update, entry.getData().getId().getValue(), entry.getData());
      }
      if (!isSuccess) {
        errorCode = ErrorCode.dbFail;
View Full Code Here

    if (dataStatus.containsKey(dataId)){
      DataAccessEntry<Data> entry = dataStatus.get(dataId);
      if (entry.getAction().equals(DataAccessAction.insert) || entry.getAction().equals(DataAccessAction.update))
        data = entry.getData();
    }else{
        data = new DataAccessSessionMySQL().queryData(dataId);
    }
   
    return data;
  }
View Full Code Here

        data = entry.getData();
    }else{
      if (templateId == null) {
        return queryData(dataId);
      }else {
        data = new DataAccessSessionMySQL(templateId).queryData(dataId, templateId);
      }
    }
   
    return data;
  }
View Full Code Here

    return data;
  }
 
  public List<Data> queryDataBySql(String sql, boolean needLog, UUID templateId)
  {
    return new DataAccessSessionMySQL().queryDatas(sql, needLog, templateId);
  }
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.dao.DataAccessSessionMySQL

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.