Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public ImmutableList<StockItem> getItemList() {
- final Map<String, Integer> countMap = getCountMap();
- List<StockItem> result = getTemplate().query("select * from Produkter", new RowMapper<StockItem>() {
- public StockItem mapRow(ResultSet res, int i) throws SQLException {
- return new StockItem(res.getString("ProduktNamn"), res.getInt("ProduktPris"), res.getString("ProduktEAN"), countMap.get(res.getString("ProduktEAN")), res.getString("ProduktKategori"));
- }
- });
- return ImmutableList.copyOf(result);
- }
Add Comment
Please, Sign In to add comment