Datasets:
ArXiv:
License:
Download data/train/Manolomon/freeway-webservice/src/java/ws/AseguradoraWS.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/Manolomon/freeway-webservice/src/java/ws/AseguradoraWS.java
- Command line
-
hf download hf://datasets/RepoFusion/Stack-Repo/data/train/Manolomon/freeway-webservice/src/java/ws/AseguradoraWS.java
-
curl -L -o AseguradoraWS.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/Manolomon/freeway-webservice/src/java/ws/AseguradoraWS.java
1.42 kB
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package ws; | |
| import beans.Aseguradora; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import javax.ws.rs.FormParam; | |
| import javax.ws.rs.core.Context; | |
| import javax.ws.rs.core.UriInfo; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.POST; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.core.MediaType; | |
| import model.dao.AseguradoraDAO; | |
| /** | |
| * REST Web Service | |
| * | |
| * @author benji | |
| */ | |
| public class AseguradoraWS { | |
| private UriInfo context; | |
| /** | |
| * Creates a new instance of AseguradoraWS | |
| */ | |
| public AseguradoraWS() { | |
| } | |
| public List<Aseguradora> getAseguradoras(){ | |
| List<Aseguradora> list = new ArrayList<>(); | |
| list = AseguradoraDAO.getAseguradoras(); | |
| return list; | |
| } | |
| public Aseguradora getAseguradora( | |
| String idAseguradora | |
| ){ | |
| Aseguradora aseguradora = new Aseguradora(); | |
| aseguradora = AseguradoraDAO.getAseguradora( | |
| Integer.parseInt(idAseguradora) | |
| ); | |
| return aseguradora; | |
| } | |
| } | |