Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.rest;
- import de.itout.innova.ssp.entities.ssp.entities.*;
- import java.util.*;
- import javax.ejb.*;
- import javax.inject.*;
- import javax.persistence.*;
- import javax.ws.rs.*;
- import javax.ws.rs.core.*;
- /**
- *
- * @author swendelmann
- */
- @Path("/schnittstellen")
- @Stateless
- public class SchnittstellenResource
- {
- @Inject
- private EntityManager em;
- @Path("/all")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public List<Schnittstellen> getAll()
- {
- return em.createNamedQuery("Schnittstellen.findAll").getResultList();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement