Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The communication protocol is HTTP. The client sends request in standard HTTP URI (Uniform Resource Identifier) e.g. http://www.jpa.com:6789/find?Person;John to a JEST-enabled OpenJPA runtime. The URI syntax governs the server response. Before describing the syntax in detail, here are few typical example URI and their associated effect on the server.

Server Function

JEST URI

Get name of the persistent unit {{

http://www.jpa.com:6789/

Image Removed

}}

List simple name of the domain classes {{

http://www.jpa.com:6789/domain

Image Removed

}}

List the key-value properties of the persistent unit

{{

http://www.jpa.com:6789/properties

Image Removed

}}

Find an instance by key

{{

http://www.jpa.com:6789/find?Person;123456789

Image Removed

}}

Find an instance by key {{

http://www.jpa.com:6789/find?Person;ssn=123456789;name=John

Image Removed

}}

Get the result of the query with no parameter

{{

http://www.jpa.com:6789/query?select

Image Removed

p from Person p }}

Get the result of the query with single parameter {{

http://www.jpa.com:6789/query?select

Image Removed

p from Person p where p.name=:name;name=John }}

Get the result of the query with multiple parameters

{{

http://www.jpa.com:6789/query?select

Image Removed

p from Person p where p.name=:name and age > :age;name=John;age=20 }}

 

{{

http://www.jpa.com:6789/query?select

Image Removed

p from Person p where p.first=:first and p.last=:last;first=John;last=Doe}}

Get the single result of the query {{

http://www.jpa.com:6789/query/single?select

Image Removed

p from Person p where p.name=:name;name=John}}

Get the result of the named query {{

http://www.jpa.com:6789/query/named?QueryPersonByName;name=John

Image Removed

}}

Get the single result of the named query

{{

http://www.jpa.com:6789/query/single/named?QueryPersonByName;name=John

Image Removed

}}