@Path(value="/galleryphotographs") public class GalleryPhotographBean extends AbstractBean<GalleryPhotograph>
Constructor and Description |
---|
GalleryPhotographBean() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
countREST() |
void |
create(GalleryPhotograph entity)
Creates an GalleryPhotograph.
|
void |
edit(GalleryPhotograph entity)
Updates a GalleryPhotograph.
|
GalleryPhotograph |
find(java.lang.Long id)
Retrieves a GalleryPhotograph.
|
java.util.List<GalleryPhotograph> |
findAll()
Retrieve all instances of the entity.
|
java.util.List<GalleryPhotograph> |
findRange(java.lang.Integer from,
java.lang.Integer to) |
java.util.Collection<Comment> |
getComments(java.lang.Long id)
Retrieves the comments regarding a specific GalleryPhotograph.
|
protected javax.persistence.EntityManager |
getEntityManager()
Returns the Entity manager.
|
void |
remove(java.lang.Long id)
Removes a GalleryPhotograph.
|
count, findRange, remove
protected javax.persistence.EntityManager getEntityManager()
AbstractBean
getEntityManager
in class AbstractBean<GalleryPhotograph>
@POST @Consumes(value={"application/xml","application/json"}) public void create(GalleryPhotograph entity)
create
in class AbstractBean<GalleryPhotograph>
entity
- GalleryPhotograph@PUT @Consumes(value={"application/xml","application/json"}) public void edit(GalleryPhotograph entity)
edit
in class AbstractBean<GalleryPhotograph>
entity
- GalleryPhotograph@DELETE @Path(value="{id}") public void remove(@PathParam(value="id") java.lang.Long id)
id
- unique identifier for the GalleryPhotograph, present in the url.@GET @Path(value="{id}/comments") @Produces(value={"application/xml","application/json"}) public java.util.Collection<Comment> getComments(@PathParam(value="id") java.lang.Long id)
id
- the id of the GalleryPhotograph@GET @Path(value="{id}") @Produces(value={"application/xml","application/json"}) public GalleryPhotograph find(@PathParam(value="id") java.lang.Long id)
find
in class AbstractBean<GalleryPhotograph>
id
- unique identifier for the comment, present in the url.javax.ws.rs.WebApplicationException
- with status Response.Status.NOT_FOUND
if GalleryPhotograph with that id does not exist (any more).@GET @Produces(value={"application/xml","application/json"}) public java.util.List<GalleryPhotograph> findAll()
AbstractBean
findAll
in class AbstractBean<GalleryPhotograph>
@GET @Path(value="{from}/{to}") @Produces(value={"application/xml","application/json"}) public java.util.List<GalleryPhotograph> findRange(@PathParam(value="from") java.lang.Integer from, @PathParam(value="to") java.lang.Integer to)
@GET @Path(value="count") @Produces(value="text/plain") public java.lang.String countREST()