Search code examples
javarestjpajaxbdatamodel

REST and JAVA JPA


I am trying to understand the code of some project which is not properly documented.Am the only developer working on the task.I dont have much experience. There is a data model and there are some classes witten to access it.It was mentioned that the data model has some rest api on top of it.But when i see the code i can see getter code which makes some rest call to some uri. But i look at setter methods it has plain jpa used to persisit the object. ex extitymanger.persist(objname).

Now is it possible to use REST interface for getting the data and using JPA to persiste the data?


Solution

  • Yes, it is possible. Without knowing more it is not possible to know if it is effective. My instincts tell me it is not the best solution.