Package com.metrictracker.model

Examples of com.metrictracker.model.MetricValueDao


  private static final Logger log = Logger.getLogger(ManageMetricValue.class.getName());
 
    @Get
    public String represent() {
      Metric metric = getMetric();  
      MetricValueDao dao = new MetricValueDao();
      Iterator<MetricValue> metricValues = dao.listByProperty("metricKey", metric.getKey()).iterator();
      StringBuffer sb = new StringBuffer("");
    sb.append("Metric Name: " + metric.getName());
    sb.append(System.getProperty("line.separator"));
    while (metricValues.hasNext()) {
       MetricValue metricValue = metricValues.next();
View Full Code Here


    sb.append("Goal Name\t");
    sb.append("Goal Value\t");
    sb.append("Goal Met?\t");
    sb.append("% to Goal\t");
    sb.append(System.getProperty("line.separator"));
    MetricValueDao valueDao = new MetricValueDao();
    MetricGoalDao goalDao = new MetricGoalDao();
    List<MetricGoal> metricGoals = goalDao.listByProperty("metricKey", metric.getKey());
    Iterator<MetricValue> values =  valueDao.listByProperty("metricKey", metric.getKey()).iterator();
    while (values.hasNext()) {
      MetricValue value = values.next();
      for (int i=0; i< metricGoals.size(); i++) {
        String isGoalMet = "N";
        MetricGoal goal = metricGoals.get(i);
View Full Code Here

  @Delete
  public Representation delete() {
    MetricDao dao = new MetricDao();
    Metric metric = getMetric();

    MetricValueDao valueDao = new MetricValueDao();
    List<MetricValue> metricValues = valueDao.listByProperty("metricKey", metric.getKey());
    valueDao.deleteAll(metricValues);

    MetricGoalDao goalDao = new MetricGoalDao();
    List<MetricGoal> metricGoals = goalDao.listByProperty("metricKey", metric.getKey());
    goalDao.deleteAll(metricGoals);
View Full Code Here

    String metricName = null;
    metricName = (String) request.getParameter("metricName");
    metricName = "foo";
    Metric metric = metricDao.getMetric(metricName);
   
    MetricValueDao valueDao = new MetricValueDao();
    MetricGoalDao goalDao = new MetricGoalDao();
    List<MetricGoal> metricGoals = goalDao.listByProperty("metricKey", metric.getKey());
    Iterator<MetricValue> values =  valueDao.listByProperty("metricKey", metric.getKey()).iterator();
    int j=0;
    while (values.hasNext()) {

      j++;
      log.log(Level.WARNING, "value #" + j);
View Full Code Here

TOP

Related Classes of com.metrictracker.model.MetricValueDao

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.