Class EntityResource
java.lang.Object
org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
org.eclipse.persistence.jpa.rs.resources.common.AbstractEntityResource
org.eclipse.persistence.jpa.rs.resources.EntityResource
@Produces({"application/json","application/xml"})
@Consumes({"application/json","application/xml"})
@Path("/{version : v\\d\\.\\d|latest}/{context}/entity/")
public class EntityResource
extends AbstractEntityResource
Entity resource.
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
APPLICATION_SCHEMA_JSON, APPLICATION_SCHEMA_JSON_TYPE, factory, SERVICE_VERSION_FORMAT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(String version, String persistenceUnit, String type, HttpHeaders hh, UriInfo uriInfo, InputStream in) findAttribute
(String version, String persistenceUnit, String type, String id, String attribute, HttpHeaders hh, UriInfo ui) getEntityOptions
(String version, String persistenceUnit, String entityName, HttpHeaders httpHeaders, UriInfo uriInfo) removeAttribute
(String version, String persistenceUnit, String type, String id, String attribute, HttpHeaders hh, UriInfo ui) setOrAddAttribute
(String version, String persistenceUnit, String type, String id, String attribute, HttpHeaders hh, UriInfo ui, InputStream in) update
(String version, String persistenceUnit, String type, HttpHeaders hh, UriInfo uriInfo, InputStream in) Methods inherited from class org.eclipse.persistence.jpa.rs.resources.common.AbstractEntityResource
buildEntityOptionsResponse, createInternal, deleteInternal, findAttributeInternal, findInternal, removeAttributeInternal, setOrAddAttributeInternal, updateInternal
Methods inherited from class org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
buildPersistenceContextFactory, getMatrixParameters, getPersistenceContext, getPersistenceFactory, getPersistenceFactory, getQueryParameters, getRelationshipPartner, isValidVersion, marshallMetadata, setPersistenceFactory, setRequestUniqueId
-
Constructor Details
-
EntityResource
public EntityResource()
-
-
Method Details
-
findAttribute
@GET @Path("{type}/{id}/{attribute}") public Response findAttribute(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @PathParam("id") String id, @PathParam("attribute") String attribute, @Context HttpHeaders hh, @Context UriInfo ui) -
find
@GET @Path("{type}/{id}") public Response find(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @PathParam("id") String id, @Context HttpHeaders hh, @Context UriInfo ui) -
create
@PUT @Path("{type}") public Response create(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo uriInfo, InputStream in) throws Exception - Throws:
Exception
-
update
@POST @Path("{type}") public Response update(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @Context HttpHeaders hh, @Context UriInfo uriInfo, InputStream in) -
setOrAddAttribute
@POST @Path("{type}/{id}/{attribute}") public Response setOrAddAttribute(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @PathParam("id") String id, @PathParam("attribute") String attribute, @Context HttpHeaders hh, @Context UriInfo ui, InputStream in) -
removeAttribute
@DELETE @Path("{type}/{id}/{attribute}") public Response removeAttribute(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @PathParam("id") String id, @PathParam("attribute") String attribute, @Context HttpHeaders hh, @Context UriInfo ui) -
delete
@DELETE @Path("{type}/{id}") public Response delete(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("type") String type, @PathParam("id") String id, @Context HttpHeaders hh, @Context UriInfo ui) -
getEntityOptions
@OPTIONS @Path("{entityName}") public Response getEntityOptions(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("entityName") String entityName, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo)
-