Untitled
Anonymous
plain_text
01/05/2024 11:19 AM
636 B
21
Indexable
public List<Inventory> Search(String name) throws Exception{
if (CategoryRepo.findByCategoryname(name) != null) {
int temp = category.getCategoryId();
return (List<Inventory>) InventoryRepo.findBycategoryId(temp);
}
else if (InventoryRepo.findByProductname(name) != null){
return (List<Inventory>) InventoryRepo.findByProductname(name);
}
throw new Exception(" Product Not found");
}Editor is loading...
Leave a Comment