Package com.googlecode.objectify

Examples of com.googlecode.objectify.Objectify.query()


   
    @Override
    public List<Solution> getAll()
    {
        Objectify ofy = ObjectifyService.begin();
        Query<Solution> q = ofy.query(Solution.class);
       
        return q.list();
    }
   
    @Override
View Full Code Here


   
    @Override
    public Equation getEquation(String name)
    {
        Objectify ofy = ObjectifyService.begin();
        Query<Equation> q = ofy.query(Equation.class).filter("name", name);
       
        return q.get();
    }
   
}
View Full Code Here

   
    @Override
    public SystemEntity get(String name)
    {
        Objectify ofy = ObjectifyService.begin();
        Query<SystemEntity> q = ofy.query(SystemEntity.class).filter("name", name);
       
        return q.get();
    }
   
    @Override
View Full Code Here

   
    @Override
    public List<SystemEntity> getAll()
    {
        Objectify ofy = ObjectifyService.begin();
        Query<SystemEntity> q = ofy.query(SystemEntity.class);
       
        return q.list();
    }
   
    @Override
View Full Code Here

    // 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);
View Full Code Here

    // TODO Auto-generated constructor stub
  }

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

}
View Full Code Here

    return ofy().put(entity);
  }
 
  public QueryResultIterator<T> getAll () {
    Objectify ofy = ObjectifyService.begin();
    Query<T> query = ofy.query(clazz);
    return query.iterator();
  }


//  public Map<Key, T> putAll(Iterable entities)
View Full Code Here

    // TODO Auto-generated constructor stub
  }

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

}
View Full Code Here

    }
   
    public List<HangmanPlurkQuestion> getAllPlurkQuestions()
    {
        Objectify tObjectify = ObjectifyService.begin();
        QueryResultIterable<HangmanPlurkQuestion> tRetIter = tObjectify.query( HangmanPlurkQuestion.class ).filter( "HINT =", "country & capital" ).fetch();
       
        return Lists.newArrayList( tRetIter );
    }
   
    public List<HangmanQuestion> getAllQuestions()
View Full Code Here

    }
   
    public List<HangmanQuestion> getAllQuestions()
    {
        Objectify tObjectify = ObjectifyService.begin();
        QueryResultIterable<HangmanQuestion> tRetIter = tObjectify.query( HangmanQuestion.class ).filter( "HINT =", "country & capital" ).fetch();
       
        return Lists.newArrayList( tRetIter );
    }
}
View Full Code Here

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.