Overview
Project: restlet-jpa
Description: A Restlet extension for automatically exposing JPA entities.
License: CDDL
Current Release: Now hosted on Launchpad
The objective is to enable exposing JPA entities via URLs simple.
Depends on Restlet 1.1.
public class FooApp extends PersistenceApplication { public FooApp() { super(Persistence.createEntityManagerFactory("foo"); } @Override public Restlet createRoot() { EntityRouter router = getEntityRouter(); router.attach("/foo/", FooCollection.class); router.attach("/foo/{id}", FooResource.class); return router; } } @EntityResource(entity = Foo.class) public class FooResource extends EntityInstance<Foo> { ... } public class FooCollection extends EntityCollection<Foo> { ... }
Browsing to "/foo/" will retrieve a list of entities and "/foo/{id}" will then retrieve a representation of the entity.
Support
Please use Launchpad for raising issues and asking questions.
Attachments
- restlet-jpa-0.1.jar (14.7 kB) - added by michael on 17/08/07 11:48:17.
- jsontools-core-1.5.jar (124.4 kB) -
Required to support JSON conversions.
, added by michael on 17/08/07 11:48:50. - antlr-2.7.6.jar (433.0 kB) -
Required to support JSON conversions.
, added by michael on 17/08/07 11:49:09. - restlet-jpa-0.2.jar (23.4 kB) - added by michael on 04/02/08 14:43:13.
- restlet-jpa-0.3.jar (11.9 kB) - added by michael on 15/02/08 11:19:51.
- restlet-jpa-0.5.zip (29.3 kB) -
Binary release 0.5 of restlet-jpa
, added by michael on 11/11/08 13:13:43.
