private Company toCompany(final Row row) { final Company company = new Company(); final Person person = new Person(row.getString("first_name"), row.getString("last_name")); company.setPerson(person); company.setAddress(row.getString("address")); company.setBrandOpinions(row.getMap("brand_opinions", String.class, String.class)); return company; }
@Override public Opinions getOpinion(final String firstName, final String lastName) { final Company company = getCompany(firstName, lastName); final Brands brands = new Brands( of(company.getBrandOpinions().get("followed")), of(company.getBrandOpinions().get("hidden"))); return new Opinions(brands); }