Code example for LinkedHashSet

Methods: addAll, clear

0
    protected DiscountDAO discountDao; 
 
    @Transactional 
    public List<PizzaEntity> getMenu() { 
 
        Set<PizzaEntity> set = new LinkedHashSet<PizzaEntity>(); 
        set.clear(); 
        set.addAll(pizzaDao.getFieldEq("owner", null)); 
 
        return new LinkedList<PizzaEntity>(set); 
    } 
 
    public List<DiscountEntity> getDiscountList() { 
        return discountDao.getAll(); 
    } 
 
}