@Test public void findAllSerializationsWithFramework() { List<Serialization> serializations = serializationDao.findAllWithFramework("test"); assertEquals("There should be 2 serializations with the given framework", 2, serializations.size()); assertEquals("The first item in the serialization list should have and id of \"first-serialization\"", "first-serialization", serializations.get(0).getId()); assertEquals("The second item in the serialization list should have and id of \"third-serializations\"", "third-serialization", serializations.get(1).getId()); }
@Override public List<Serialization> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("typeClass").asList(); }
MongoSerializationDao extends MongoDao<Serialization, String> implements SerializationDao { @Override public List<Serialization> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("typeClass").asList(); } }
MongoSerializationDao extends MongoDao<Serialization, String> implements SerializationDao { @Override public List<Serialization> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("typeClass").asList(); } @Inject  MongoSerializationDao(Datastore datastore); }
MongoSerializationDao extends MongoDao<Serialization, String> implements SerializationDao { @Override public List<Serialization> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("typeClass").asList(); } @Inject  MongoSerializationDao(Datastore datastore); @Override List<Serialization> findAll(); @Override List<Serialization> findAllWithFramework(String framework); @Override Serialization findByTypeClass(String typeClass); }
MongoSerializationDao extends MongoDao<Serialization, String> implements SerializationDao { @Override public List<Serialization> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("typeClass").asList(); } @Inject  MongoSerializationDao(Datastore datastore); @Override List<Serialization> findAll(); @Override List<Serialization> findAllWithFramework(String framework); @Override Serialization findByTypeClass(String typeClass);  }