Guest User

Untitled

a guest
Jun 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @Override
  2. public ImmutableList<StockItem> getItemList() {
  3. final Map<String, Integer> countMap = getCountMap();
  4. List<StockItem> result = getTemplate().query("select * from Produkter", new RowMapper<StockItem>() {
  5. public StockItem mapRow(ResultSet res, int i) throws SQLException {
  6. return new StockItem(res.getString("ProduktNamn"), res.getInt("ProduktPris"), res.getString("ProduktEAN"), countMap.get(res.getString("ProduktEAN")), res.getString("ProduktKategori"));
  7.  
  8. }
  9. });
  10. return ImmutableList.copyOf(result);
  11. }
Add Comment
Please, Sign In to add comment