Esempio n. 1
0
  public void removeEntity(int rowIndex) {

    GenericDao<Bid> bidDao = DaoManager.getInstance().getBidDao();
    Good entity = (Good) items.get(rowIndex);

    for (Bid b : entity.getBids()) {
      bidDao.delete(b);
    }

    items.remove(rowIndex);
    fireTableDataChanged();
    DAO.delete((T) entity);
  }
Esempio n. 2
0
 public void addEntity(T item) {
   DAO.create(item);
   fireTableDataChanged();
 }
Esempio n. 3
0
 @Override
 public int getRowCount() {
   items = DAO.findAll();
   return items.size();
 }