@Test public void findKafkaClusterByName() { KafkaCluster validCluster = kafkaDao.findByName("First Cluster"); assertNotNull("The returned cluster should not be null with valid query values", validCluster); KafkaCluster invalidCluster = kafkaDao.findByName("Invalid Cluster"); assertNull("The returned component should be null with invalid query values", invalidCluster); }
@Override public KafkaCluster findByName(String name) { return query().field("name").equal(name).get(); }
MongoKafkaDao extends MongoDao<KafkaCluster, String> implements KafkaDao { @Override public KafkaCluster findByName(String name) { return query().field("name").equal(name).get(); } }
MongoKafkaDao extends MongoDao<KafkaCluster, String> implements KafkaDao { @Override public KafkaCluster findByName(String name) { return query().field("name").equal(name).get(); } @Inject  MongoKafkaDao(Datastore datastore); }
MongoKafkaDao extends MongoDao<KafkaCluster, String> implements KafkaDao { @Override public KafkaCluster findByName(String name) { return query().field("name").equal(name).get(); } @Inject  MongoKafkaDao(Datastore datastore); @Override List<KafkaCluster> findAll(); @Override KafkaCluster findByName(String name); }
MongoKafkaDao extends MongoDao<KafkaCluster, String> implements KafkaDao { @Override public KafkaCluster findByName(String name) { return query().field("name").equal(name).get(); } @Inject  MongoKafkaDao(Datastore datastore); @Override List<KafkaCluster> findAll(); @Override KafkaCluster findByName(String name);  }