public void delete(Item item) { try { item = itemDAO.load(item.getId()); if (item == null) { throw new ApplicationRuntimeException(bundle.getString("OBJECT_NOT_FOUND")); } List<Auction> listAuctions = auctionDAO.listAllAuctionsByItem(item); if (listAuctions != null) if (listAuctions.size() > 0) throw new ApplicationRuntimeException( bundle.getString("ADM_ITEM_DELETE_NOK_THERE_ARE_AUCTIONS")); itemDAO.delete(item.getId()); } catch (Exception e) { e.printStackTrace(); throw new ApplicationRuntimeException(bundle.getString("ADM_ITEM_DELETED_NOK" + e)); } }