Package com.metrictracker.model

Source Code of com.metrictracker.model.MetricDao

package com.metrictracker.model;

import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyService;

public class MetricDao extends ObjectifyGenericDao<Metric> {

  public MetricDao() {
    super(Metric.class);
    // TODO Auto-generated constructor stub
  }

  public Metric getMetric (String metricName) {
    Objectify ofy = ObjectifyService.begin();
    return ofy.query(Metric.class).filter("name", metricName).get();
  }

//  public QueryResultIterator<Metric> getMetrics () {
//    Objectify ofy = ObjectifyService.begin();
//    Query<Metric> query = ofy.query(Metric.class);
//    return query.iterator();
//  }

  public boolean addMetricGoal (Metric metric, MetricGoal metricGoal) {
    //Objectify ofy = ObjectifyService.begin();
    return true;

  }
}
TOP

Related Classes of com.metrictracker.model.MetricDao

TOP
Copyright © 2018 www.massapi.com. 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.