Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/DesignDocs/326663"
m (→GET - Read Operation) |
m (→PUT - Update Operation) |
||
Line 62: | Line 62: | ||
==== PUT - Update Operation ==== | ==== PUT - Update Operation ==== | ||
+ | |||
+ | <source lang="java"> | ||
+ | @PUT | ||
+ | @Consumes(MediaType.APPLICATION_XML) | ||
+ | public void update(Customer customer) { | ||
+ | entityManager.merge(customer); | ||
+ | } | ||
+ | </source> | ||
==== DELETE - Delete Operation ==== | ==== DELETE - Delete Operation ==== |
Revision as of 10:06, 30 September 2010
Design Specification: JPA RESTful Service
Document History
Date | Author | Version Description & Notes |
---|---|---|
Project overview
Overview of the project/feature. Why is it desired, what are its goals.
Goals:
- goal 1
- goal 2
Concepts
The following example demonstrates how JPA can be used to implement a RESTful web service:
Requirements
The following sections will expand the goals of this project into more concrete requirements.
Design Constraints
Design / Functionality
REST (CRUD) Operations
POST - Create Operation
@POST @Consumes(MediaType.APPLICATION_XML) public void create(Customer customer) { entityManager.persist(customer); }
GET - Read Operation
@GET @Produces(MediaType.APPLICATION_XML) @Path("{id}") public Customer read(@PathParam("id") long id) { return entityManager.find(Customer.class, id); }
PUT - Update Operation
@PUT @Consumes(MediaType.APPLICATION_XML) public void update(Customer customer) { entityManager.merge(customer); }
DELETE - Delete Operation
URI Representation
Unary Key
Composite Keys
Named Queries
Testing
API
GUI
Config files
Documentation
Open Issues
This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.
Issue # | Owner | Description / Notes |
---|---|---|
Decisions
This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.
Issue # | Description / Notes | Decision |
---|---|---|
Future Considerations
During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.