Using JDev 11g PS4
The model of my application has a mix of different sources. Some entities are stored in my database.
Other entities are coming from a call to an external REST API.
I am wondering what the best solution is to integrate those REST API objects into my model project because I don't want to expose them as rest api to my view. In my view project, I want to hide the complexity of those API's by exposing data controls.
Now, what is the best way?
1) Creating POJO's and creating data controls out of them. These pojo's will have a signature like this:
public class Foo {
public List<FooObject> getFoos();
public void addFoo(FooObject foo);
public void removeFoo(FooObject foo);
....
}
This will be exposed to my view so I can easily use it in my view project.
2) Create view objects to map the entities from my rest API and implement the REST API calls in the custom implementation of the view objects.
3) ...
Any other suggestion is more then welcom.