wood burning stoves
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @QueryHint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@QueryHint" Watch "@QueryHint" New topic


Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
in my Entity-

@QueryHint (name=TopLinkQueryHints.BIND_PARAMETERS, value=HintValues.PERSISTENCE_UNIT_DEFAULT)

I am unable to resolve the @QueryHint annotation. Even though i included the jar file's
import oracle.toplink.essentials.config.HintValues;
import oracle.toplink.essentials.config.TopLinkQueryHints;

but still it's unresolveable.

Also i am doubtful about it's syntax usage.
I have included all Oracle TopLink jar file's.

I want to know about correct jar file and syntax required for @QueryHint.

This link http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/ent30qry003.htm wasn't useful for me.

SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Check the J2EE API, QueryHint is in the javax.persistence package.

[My Blog]
All roads lead to JavaRanch
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
I got it, it is present here


and this is the correct systax usage-

query = "select c from Car c where c.steering like :steering",
hints = {@QueryHint (name= "toplink.jdbc.timeout", value = "10")}

thanks Christophe...
I agree. Here's the link: http://aspose.com/file-tools
subject: @QueryHint
jQuery in Action, 3rd edition