In C++/OCCI interface, given a REF to an object, we are able to prefetch all related objects up to a configurable "depth" using the preFetch() method on a REF object.
Is there any analogue for that in Java? That is, given a Java REF object, how can I prefetch all associated objects?
it's been a while since i've looked at it, but could you create a custom SQLData implementation for handling the REF types you're interested in, which would (attempt anyways) to prefetch the referenced object at the same time you 'get' the reference via JDBC?
Edit 5/11/11 Make that the OraData and OraDataFactory interfaces. Create custom implementations of these interfaces, adding complex object retrieval and caching mechanisms, and then use them in your JDBC getOraData(int colIndex, OraDataFactory factory)' calls.