Hi All,
I'm using a DescriptorEventListener implementation to get the callbacks for an entity class.
In the postBuild callback i want to check if the executed query was a user defined query or created by EntityManager API methods call.
So i tried this:
public void postBuild(DescriptorEvent event) {
DatabaseQuery query = event.getQuery();
if (query != null && query.isUserDefined()) {
doSomething();
} else {
doSomethingElse();
}
}
But for some user defined queries (NamedQuery, NamedNativeQuery etc), it executes doSomething() whereas for others it executes doSomethingElse().
Can anybody tell me the exact behavior of isUserDefined()??
Thanks & Regards,
Rajbir
[Message sent by forum member 'rajbirb' (rajbirb)]
http://forums.java.net/jive/thread.jspa?messageID=266745