Is it possible/practical to have an Entity class without an underlying database available?
To contradict myself, I have a database(!) which can be accessed over jdbc, but it’s proprietary and only supports a couple of methods – connect/disconnect/execute – no schema browsing, no metadata, or connecting through a tool – only code.
What I’d like to do is create a set of restful web services that access the database & those appear to need underlying Entity classes based on the database.
So, my question is if this is the right way to handle this situation? I’m reasonably new to these technologies so am probably struggling with design issues more – any articles I can read up on how to approach this would be great.
Many thanks
Restful web services in general don’t have to be based on accessing database through entities. You might have seen it in various examples, but JPA and web services are totally independent technologies.
In the situation you describe, using entities does not seem reasonable, or even possible. It depends on how this proprietary JDBC driver is implemented – and from what you’ve said, it’s not a full implementation.