Package com.narirelays.ems.persistence.orm

Examples of com.narirelays.ems.persistence.orm.CellValue


      {
        Calendar cal  = Calendar.getInstance();
        cal.clear();
        Date date = cal.getTime();
        CellValueId cellValueID = new CellValueId(id, new Timestamp(date.getTime()));
        CellValue cellValue = cellValueDAO.findById(cellValueID);
        if(cellValue!=null)
          result = cellValue.getValue();
      }
      else//day,month,year
      {
        if(reportType.equalsIgnoreCase("day"))
        {
          sdf = new SimpleDateFormat("yyyy-MM-dd")
        }
        else if(reportType.equalsIgnoreCase("month"))//月报,时间id为yyyy-MM-1
        {
          sdf = new SimpleDateFormat("yyyy-MM");
        }
        else if(reportType.equalsIgnoreCase("year"))//年报,时间id为yyyy-1-1
        {
          sdf = new SimpleDateFormat("yyyy");       
        }
        String timeString = sdf.format(time);
        try {
          Date date = sdf.parse(timeString);//得到格式化的时间id
          CellValueId cellValueID = new CellValueId(id, new Timestamp(date.getTime()));
          CellValue cellValue = cellValueDAO.findById(cellValueID);
          if(cellValue!=null)
            result = cellValue.getValue();
         
        } catch (ParseException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
View Full Code Here


        result.setFailed("Time Format error!");
        return result;
      }
    }
    CellValueId cellValueID = new CellValueId(cell.getMeasureId(), new Timestamp(time.getTime()));
    CellValue cellValue = new CellValue(cellValueID);
    cellValue.setTemplateId(templateID);//设置报表模板id,以便于报表模板删除
    Object valueObj = properties.get("value");
    if(valueObj!=null)
    {
      cellValue.setValue(stringValue(valueObj));
    }
    cellValueDAO.merge(cellValue);   
    result.setSucceed();
    return result;
  }
View Full Code Here

TOP

Related Classes of com.narirelays.ems.persistence.orm.CellValue

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.