Versions Compared

Key

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

JEST uses HTTP as communication protocol and HTTP URI as its command syntax.
A JEST URI introduces specific syntax rule on a standard URI to interpret the commands.

...

Panel

...

titleBGColor

...

#F7D6C1

...

titleList simple name of the domain classes

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

...

Image Added

Panel
titleBGColor#F7D6C1
titleList the key-value properties of the persistent unit

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

...

Image Added

Panel
titleBGColor#F7D6C1
titleFind an instance by simple key

http://www.jpa.com/jest/find?type=Person&123456789

...

Image Added

Panel
titleBGColor#F7D6C1
title

...

Find an instance by compound key

http://www.jpa.com/jest/find?type=Person&ssn=123456789&name=John

...

Image Added

Panel
titleBGColor#F7D6C1
titleQuery

...

06

...

with no parameter

http://www.jpa.com/jest/query?q=selectImage Added p from Person p

...

Panel
titleBGColor#F7D6C1
titleQuery

...

07

...

with single parameter

http://www.jpa.com/jest/query?q=selectImage Added p from Person p where p.name=:name&name=John

...

08.1

Panel
titleBGColor#F7D6C1
titleQuery

...

with multiple parameters

http://www.jpa.com/jest/query?q=selectImage Added p from Person p where p.name=:name and age > :age&name=John&age=20

...

Panel

...

 

...

http://www.jpa.com/jest/query?q=select p from Person p where p.first=:first and p.last=:last&first=John&last=Doe

titleBGColor#F7D6C1
titleQuery for single result

...

09

...

http://www.jpa.com/jest/query/single?q=selectImage Added p from Person p where p.name=:name&name=John

...

Panel
titleBGColor#F7D6C1
title

...

Get the result of the named query

http://www.jpa.com/jest/query/named?q=QueryPersonByName&name=John

...

Image Added

Panel
titleBGColor#F7D6C1
title

...

Get the single result of the named query

http://www.jpa.com/jest/query/single/named?q=QueryPersonByName&name=JohnImage Added

...

11.2

or

http://www.jpa.com/jest/query

...

?q=

...

selectImage Added p from Person p where p.first=:first and p.last=:last&first=John&last=Doe

Panel
titleBGColor#F7D6C1
title

...

Get first 20 rows of query using a fetch plan

http://www.jpa.com/jest/query/fecthplan=myPlan/ignoreCache/maxResult=20?q=selectImage Modified

...

p from Person p

Code Block
titleURI syntax for JEST
   uri := http://host[:port]/action/[qualifier]*['?'[parameter]'&'*]

   qualifier := qualifier-key['='qualifier-value]
   parameter := parameter-key'='parameter-value 
   
   action    : denotes the JPA operation to be performed.
               For example, find, query, insert, merge, remove, properties, domain etc.

   qualifier : qualifies the action. 
               specific to the action, e.g. a query action can qualify with query/single to get a single result as in above ex09.
               zero or more qualifier can be specified. 
               qualifier may have value separated by '='  
               each qualifier is separated by '/' 
               qualifier ordering is not significant (see above ex11.1 and ex11.2)
            
   parameter  : parameter for the action
            For example, JPQL string is a parameter for a query action
            zero or more parameter can be specified
            parameter may have value separated by '='
            each parameter is separated by '&' 
            first parameter can have special semantics based on action, e.g. first parameter for 'query' is JPQL string, 
            or first parameter for 'find' is the entity name, etc.