public Product searchById(Long productId) throws ClassNotFoundException, IOException, BussinessException { DataTransferObject dto = new DataTransferObject("Product", "SearchById", productId); DataTransferObject dtoRet = this.getTalker().sendAndGetData(dto); return (Product) dtoRet.getObjectData(); }
public String delete(Long productId) throws ClassNotFoundException, IOException, BussinessException { DataTransferObject dto = new DataTransferObject("Product", "Delete", productId); DataTransferObject dtoRet = this.getTalker().sendAndGetData(dto); return dtoRet.getObjectData().toString(); }
@SuppressWarnings("unchecked") public ArrayList<Product> searchByDescription(String productDescription) throws ClassNotFoundException, IOException, BussinessException { DataTransferObject dto = new DataTransferObject("Product", "searchByDescription", productDescription); DataTransferObject dtoRet = this.getTalker().sendAndGetData(dto); return (ArrayList<Product>) dtoRet.getObjectData(); }