@Test public void getItem_shouldFindExistingItem() { Item foundItem = persistence.getItem(this.existingItem.getItemId()); assertHaveSamePersistentFields(this.existingItem, foundItem, "supplier"); }
@Override public Item getItem(@Nonnull final String itemId) { Item item = read(itemId); if (item != null) { Product product = productBasePersistence.getProduct(item.getProductId()); item.setProduct(product); } return item; }
ItemBasePersistence extends AbstractBasePersistence<Item, String> implements ItemMapper { @Override public Item getItem(@Nonnull final String itemId) { Item item = read(itemId); if (item != null) { Product product = productBasePersistence.getProduct(item.getProductId()); item.setProduct(product); } return item; } }
ItemBasePersistence extends AbstractBasePersistence<Item, String> implements ItemMapper { @Override public Item getItem(@Nonnull final String itemId) { Item item = read(itemId); if (item != null) { Product product = productBasePersistence.getProduct(item.getProductId()); item.setProduct(product); } return item; }  }
ItemBasePersistence extends AbstractBasePersistence<Item, String> implements ItemMapper { @Override public Item getItem(@Nonnull final String itemId) { Item item = read(itemId); if (item != null) { Product product = productBasePersistence.getProduct(item.getProductId()); item.setProduct(product); } return item; }  @Override void updateInventoryQuantity(@Nonnull final Map<String, Object> param); @Override int getInventoryQuantity(@Nonnull final String itemId); @Override List<Item> getItemListByProduct(@Nonnull final String productId); @Override Item getItem(@Nonnull final String itemId); }
ItemBasePersistence extends AbstractBasePersistence<Item, String> implements ItemMapper { @Override public Item getItem(@Nonnull final String itemId) { Item item = read(itemId); if (item != null) { Product product = productBasePersistence.getProduct(item.getProductId()); item.setProduct(product); } return item; }  @Override void updateInventoryQuantity(@Nonnull final Map<String, Object> param); @Override int getInventoryQuantity(@Nonnull final String itemId); @Override List<Item> getItemListByProduct(@Nonnull final String productId); @Override Item getItem(@Nonnull final String itemId);  }