Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. package com.example.rest;
  2.  
  3. import de.itout.innova.ssp.entities.ssp.entities.*;
  4. import java.util.*;
  5. import javax.ejb.*;
  6. import javax.inject.*;
  7. import javax.persistence.*;
  8. import javax.ws.rs.*;
  9. import javax.ws.rs.core.*;
  10.  
  11. /**
  12. *
  13. * @author swendelmann
  14. */
  15. @Path("/schnittstellen")
  16. @Stateless
  17. public class SchnittstellenResource
  18. {
  19.  
  20. @Inject
  21. private EntityManager em;
  22.  
  23. @Path("/all")
  24. @GET
  25. @Produces(MediaType.APPLICATION_JSON)
  26. public List<Schnittstellen> getAll()
  27. {
  28. return em.createNamedQuery("Schnittstellen.findAll").getResultList();
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement