Some info

Falcon has provided functionality to allow binding of JPA generated beans. For now the functionalities cover selects from JPAQL and allow specification of parameters. The value of these parameters can be:
  • static or from other beans
  • generated by falcon (i.e. dtRef)
  • existing objects passed into the engine.
Examples of falcon files can be found under:

Straight JPAQL with no paramters

                  <?xml version="1.0" encoding="UTF-8" ?>
                        <falconBind:falcon xmlns:xsi=""
                        xsi:schemaLocation=" ../../../main/xsd/falconBind.xsd"
                        xmlns:falconBind="" id="testId">
                                    classObject="com.falcon.mock.testObjects.EmpJpa" name="testJpaPojo"
                                    <falconBind:JPA persistence-unit_name="example" query="select e from EmpJpa e" return_as_list="true"/>
The noticeable change here from a pojo definition are:
  • 'type' attribute of 'dataTransfer' tag is now 'JPA' rather then 'pojo'.
  • new tag 'ObjectStory' and its related 'JPA' tag is used to specify JPA settings
  • 'retrun_as_list' attribute can be 'true' or 'false' depending on how you want want your object(s) back.

getting your JPA objects from Falcon

There is no special syntax for doing that is the same as getting back pojos! Note only 1 line of code is required to get your JPA object(s) back!!! ;) As List:
                    List empList = (List) runner.getObject("testJpaPojo");
As Single Object (when 'return_as_list' is set to 'false'):
                    EmpJpa emp = (EmpJpa) runner.getObject("testJpaPojo");