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);