Ejemplo n.º 1
0
 public School findSchoolByName(String schoolName) {
   QueryBuilder<School> builder = qbf.newQueryBuilder(School.class);
   SchoolEntity.SchoolState template = templateFor(SchoolEntity.SchoolState.class);
   builder.where(eq(template.name(), schoolName));
   Query<School> query = builder.newQuery(uowf.currentUnitOfWork());
   return query.find();
 }
Ejemplo n.º 2
0
 public Query<School> findAll() {
   return qbf.newQueryBuilder(School.class).newQuery(uowf.currentUnitOfWork());
 }