Commit 8362494d by Patryk Czarnik

Sklep.readAll

parent 540e4b46
package sklep.soap;
import java.util.List;
import jakarta.jws.WebService;
import sklep.db.DBConnection;
import sklep.db.DBException;
import sklep.db.ProductDAO;
import sklep.model.Product;
@WebService
public class Sklep {
public List<Product> readAll() throws DBException {
try(DBConnection db = DBConnection.open()) {
ProductDAO productDAO = db.productDAO();
return productDAO.readAll();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment