Hi, First of all, ojb is great and I find great support on this list.
Unfortunately I did not find a solution to the following problem.
At the moment I'm implementing a persistent datalayer for an application that has to perform queries over large sets of data.
I only want to search for id's so I use dynamic proxies, but I don't want to materialize each proxy to query its details.
Now I implemented something like:
for (Iterator iter = myCreatedPersistenceBroker.getIteratorByQuery(someQueryReturningLargeSet);
iter.hasNext(); )
{
java.lang.reflect.Proxy item = (java.lang.reflect.Proxy) iter.next();
IndirectionHandler handler = (IndirectionHandler) item.getInvocationHandler(item);
Object[] values = handler.getIdentity().getPrimaryKeyValues();
if (values[0].equals(theIdSearchedFor) )
{
TargetInterface target = (TargetInterface) item;
}
}
This worked and was in a first test about 5 times faster than querying all materialized proxies but it seems so complicated to me.
Is there a proper way to achieve this using ojb-pb api or am I misunderstanding something completely?
thanks a lot in advance,
Piet
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
