<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><!-- GenHTML@15714-->
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<!-- ident "%Z%%M% %I% %E% SMI" -->

<title>Query Hints
</title>
<script type="text/javascript" src="/com_sun_web_ui/js/browserVersion.js"></script>
<script type="text/javascript" src="/com_sun_web_ui/js/stylesheet.js"></script>
<script type="text/javascript"><!-- Empty script so IE5.0 Windows will draw table and button borders --></script>
<meta name="Copyright" content="Copyright © 2006 by Sun Microsystems, Inc. All Rights Reserved." />
</head>

<body class="HlpBdy">

<A NAME="gbzgp"></A><h2>Query Hints</h2>
<A NAME="indexterm-406"></A><A NAME="indexterm-407"></A><p>Query hints are additional, implementation-specific configuration
settings. You can use hints in your queries in the following format:</p>
<table cellpadding="4" border="1" cols="1" width="100%"><td><pre>setHint("<i>hint-name</i>", <i>hint-value</i>)</pre>
</td></table><br><p>For example:</p>
<table cellpadding="4" border="1" cols="1" width="100%"><td><pre>Customer customer = (Customer)entityMgr.
createNamedQuery("findCustomerBySSN").
setParameter("SSN", "123-12-1234").
setHint("toplink.refresh", true).
getSingleResult();</pre>
</td></table><br><p>For more
information about the query hints available with the default provider,
see <A HREF="http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#QueryHints">Query Hints</A>.</p>

<br />

</body>
</html>