blob: 9c806516bc0bec652c54443ba84492afcf25d6ef [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>CriteriaQuery</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CriteriaQuery";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../jakarta/persistence/criteria/CriteriaDelete.html" title="interface in jakarta.persistence.criteria"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/persistence/criteria/CriteriaUpdate.html" title="interface in jakarta.persistence.criteria"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/persistence/criteria/CriteriaQuery.html" target="_top">Frames</a></li>
<li><a href="CriteriaQuery.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">jakarta.persistence.criteria</div>
<h2 title="Interface CriteriaQuery" class="title">Interface CriteriaQuery&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the defined result</dd>
</dl>
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;T&gt;, <a href="../../../jakarta/persistence/criteria/CommonAbstractCriteria.html" title="interface in jakarta.persistence.criteria">CommonAbstractCriteria</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">CriteriaQuery&lt;T&gt;</span>
extends <a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;T&gt;</pre>
<div class="block">The <code>CriteriaQuery</code> interface defines functionality that is specific
to top-level queries.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#distinct-boolean-">distinct</a></span>(boolean&nbsp;distinct)</code>
<div class="block">Specify whether duplicate query results will be eliminated.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#getOrderList--">getOrderList</a></span>()</code>
<div class="block">Return the ordering expressions in order of precedence.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../../jakarta/persistence/criteria/ParameterExpression.html" title="interface in jakarta.persistence.criteria">ParameterExpression</a>&lt;?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#getParameters--">getParameters</a></span>()</code>
<div class="block">Return the parameters of the query.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#groupBy-jakarta.persistence.criteria.Expression...-">groupBy</a></span>(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;?&gt;...&nbsp;grouping)</code>
<div class="block">Specify the expressions that are used to form groups over
the query results.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#groupBy-java.util.List-">groupBy</a></span>(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;?&gt;&gt;&nbsp;grouping)</code>
<div class="block">Specify the expressions that are used to form groups over
the query results.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#having-jakarta.persistence.criteria.Expression-">having</a></span>(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;java.lang.Boolean&gt;&nbsp;restriction)</code>
<div class="block">Specify a restriction over the groups of the query.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#having-jakarta.persistence.criteria.Predicate...-">having</a></span>(<a href="../../../jakarta/persistence/criteria/Predicate.html" title="interface in jakarta.persistence.criteria">Predicate</a>...&nbsp;restrictions)</code>
<div class="block">Specify restrictions over the groups of the query
according the conjunction of the specified restriction
predicates.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#multiselect-java.util.List-">multiselect</a></span>(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;?&gt;&gt;&nbsp;selectionList)</code>
<div class="block">Specify the selection items that are to be returned in the
query result.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#multiselect-jakarta.persistence.criteria.Selection...-">multiselect</a></span>(<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;?&gt;...&nbsp;selections)</code>
<div class="block">Specify the selection items that are to be returned in the
query result.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#orderBy-java.util.List-">orderBy</a></span>(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>&gt;&nbsp;o)</code>
<div class="block">Specify the ordering expressions that are used to
order the query results.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#orderBy-jakarta.persistence.criteria.Order...-">orderBy</a></span>(<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>...&nbsp;o)</code>
<div class="block">Specify the ordering expressions that are used to
order the query results.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#select-jakarta.persistence.criteria.Selection-">select</a></span>(<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;? extends <a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;selection)</code>
<div class="block">Specify the item that is to be returned in the query result.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#where-jakarta.persistence.criteria.Expression-">where</a></span>(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;java.lang.Boolean&gt;&nbsp;restriction)</code>
<div class="block">Modify the query to restrict the query result according
to the specified boolean expression.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html#where-jakarta.persistence.criteria.Predicate...-">where</a></span>(<a href="../../../jakarta/persistence/criteria/Predicate.html" title="interface in jakarta.persistence.criteria">Predicate</a>...&nbsp;restrictions)</code>
<div class="block">Modify the query to restrict the query result according
to the conjunction of the specified restriction predicates.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.jakarta.persistence.criteria.AbstractQuery">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;jakarta.persistence.criteria.<a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a></h3>
<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#from-java.lang.Class-">from</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#from-jakarta.persistence.metamodel.EntityType-">from</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#getGroupList--">getGroupList</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#getGroupRestriction--">getGroupRestriction</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#getResultType--">getResultType</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#getRoots--">getRoots</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#getSelection--">getSelection</a>, <a href="../../../jakarta/persistence/criteria/AbstractQuery.html#isDistinct--">isDistinct</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.jakarta.persistence.criteria.CommonAbstractCriteria">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;jakarta.persistence.criteria.<a href="../../../jakarta/persistence/criteria/CommonAbstractCriteria.html" title="interface in jakarta.persistence.criteria">CommonAbstractCriteria</a></h3>
<code><a href="../../../jakarta/persistence/criteria/CommonAbstractCriteria.html#getRestriction--">getRestriction</a>, <a href="../../../jakarta/persistence/criteria/CommonAbstractCriteria.html#subquery-java.lang.Class-">subquery</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="select-jakarta.persistence.criteria.Selection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>select</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;select(<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;? extends <a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;selection)</pre>
<div class="block">Specify the item that is to be returned in the query result.
Replaces the previously specified selection(s), if any.
<p> Note: Applications using the string-based API may need to
specify the type of the select item when it results from
a get or join operation and the query result type is
specified.
<pre>
For example:
CriteriaQuery&#060;String&#062; q = cb.createQuery(String.class);
Root&#060;Order&#062; order = q.from(Order.class);
q.select(order.get("shippingAddress").&#060;String&#062;get("state"));
CriteriaQuery&#060;Product&#062; q2 = cb.createQuery(Product.class);
q2.select(q2.from(Order.class)
.join("items")
.&#060;Item,Product&#062;join("product"));
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>selection</code> - selection specifying the item that
is to be returned in the query result</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the selection is
a compound selection and more than one selection
item has the same assigned alias</dd>
</dl>
</li>
</ul>
<a name="multiselect-jakarta.persistence.criteria.Selection...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiselect</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;multiselect(<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;?&gt;...&nbsp;selections)</pre>
<div class="block">Specify the selection items that are to be returned in the
query result.
Replaces the previously specified selection(s), if any.
The type of the result of the query execution depends on
the specification of the type of the criteria query object
created as well as the arguments to the multiselect method.
<p> An argument to the multiselect method must not be a tuple-
or array-valued compound selection item.
<p>The semantics of this method are as follows:
<ul>
<li>
If the type of the criteria query is
<code>CriteriaQuery&#060;Tuple&#062;</code> (i.e., a criteria
query object created by either the
<code>createTupleQuery</code> method or by passing a
<code>Tuple</code> class argument to the
<code>createQuery</code> method), a <code>Tuple</code> object
corresponding to the arguments of the <code>multiselect</code>
method, in the specified order, will be instantiated and
returned for each row that results from the query execution.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;X&#062;</code> for
some user-defined class X (i.e., a criteria query object
created by passing a X class argument to the <code>createQuery</code>
method), the arguments to the <code>multiselect</code> method will be
passed to the X constructor and an instance of type X will be
returned for each row.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;X[]&#062;</code> for
some class X, an instance of type X[] will be returned for
each row. The elements of the array will correspond to the
arguments of the <code>multiselect</code> method, in the
specified order.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;Object&#062;</code>
or if the criteria query was created without specifying a
type, and only a single argument is passed to the <code>multiselect</code>
method, an instance of type <code>Object</code> will be returned for
each row.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;Object&#062;</code>
or if the criteria query was created without specifying a
type, and more than one argument is passed to the <code>multiselect</code>
method, an instance of type <code>Object[]</code> will be instantiated
and returned for each row. The elements of the array will
correspond to the arguments to the <code> multiselect</code> method,
in the specified order.
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>selections</code> - selection items corresponding to the
results to be returned by the query</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if a selection item is
not valid or if more than one selection item has
the same assigned alias</dd>
</dl>
</li>
</ul>
<a name="multiselect-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiselect</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;multiselect(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Selection.html" title="interface in jakarta.persistence.criteria">Selection</a>&lt;?&gt;&gt;&nbsp;selectionList)</pre>
<div class="block">Specify the selection items that are to be returned in the
query result.
Replaces the previously specified selection(s), if any.
<p> The type of the result of the query execution depends on
the specification of the type of the criteria query object
created as well as the argument to the <code>multiselect</code> method.
An element of the list passed to the <code>multiselect</code> method
must not be a tuple- or array-valued compound selection item.
<p> The semantics of this method are as follows:
<ul>
<li> If the type of the criteria query is <code>CriteriaQuery&#060;Tuple&#062;</code>
(i.e., a criteria query object created by either the
<code>createTupleQuery</code> method or by passing a <code>Tuple</code> class argument
to the <code>createQuery</code> method), a <code>Tuple</code> object corresponding to
the elements of the list passed to the <code>multiselect</code> method,
in the specified order, will be instantiated and returned for each
row that results from the query execution.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;X&#062;</code> for
some user-defined class X (i.e., a criteria query object
created by passing a X class argument to the <code>createQuery</code>
method), the elements of the list passed to the <code>multiselect</code>
method will be passed to the X constructor and an instance
of type X will be returned for each row.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;X[]&#062;</code> for
some class X, an instance of type X[] will be returned for
each row. The elements of the array will correspond to the
elements of the list passed to the <code>multiselect</code> method,
in the specified order.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;Object&#062;</code>
or if the criteria query was created without specifying a
type, and the list passed to the <code>multiselect</code> method contains
only a single element, an instance of type <code>Object</code> will be
returned for each row.
<li> If the type of the criteria query is <code>CriteriaQuery&#060;Object&#062;</code>
or if the criteria query was created without specifying a
type, and the list passed to the <code>multiselect</code> method contains
more than one element, an instance of type <code>Object[]</code> will be
instantiated and returned for each row. The elements of the
array will correspond to the elements of the list passed to
the <code>multiselect</code> method, in the specified order.
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>selectionList</code> - list of selection items corresponding
to the results to be returned by the query</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if a selection item is
not valid or if more than one selection item has
the same assigned alias</dd>
</dl>
</li>
</ul>
<a name="where-jakarta.persistence.criteria.Expression-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>where</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;where(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;java.lang.Boolean&gt;&nbsp;restriction)</pre>
<div class="block">Modify the query to restrict the query result according
to the specified boolean expression.
Replaces the previously added restriction(s), if any.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#where-jakarta.persistence.criteria.Expression-">where</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>restriction</code> - a simple or compound boolean expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="where-jakarta.persistence.criteria.Predicate...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>where</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;where(<a href="../../../jakarta/persistence/criteria/Predicate.html" title="interface in jakarta.persistence.criteria">Predicate</a>...&nbsp;restrictions)</pre>
<div class="block">Modify the query to restrict the query result according
to the conjunction of the specified restriction predicates.
Replaces the previously added restriction(s), if any.
If no restrictions are specified, any previously added
restrictions are simply removed.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#where-jakarta.persistence.criteria.Predicate...-">where</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>restrictions</code> - zero or more restriction predicates</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="groupBy-jakarta.persistence.criteria.Expression...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>groupBy</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;groupBy(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;?&gt;...&nbsp;grouping)</pre>
<div class="block">Specify the expressions that are used to form groups over
the query results.
Replaces the previous specified grouping expressions, if any.
If no grouping expressions are specified, any previously
added grouping expressions are simply removed.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#groupBy-jakarta.persistence.criteria.Expression...-">groupBy</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>grouping</code> - zero or more grouping expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="groupBy-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>groupBy</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;groupBy(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;?&gt;&gt;&nbsp;grouping)</pre>
<div class="block">Specify the expressions that are used to form groups over
the query results.
Replaces the previous specified grouping expressions, if any.
If no grouping expressions are specified, any previously
added grouping expressions are simply removed.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#groupBy-java.util.List-">groupBy</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>grouping</code> - list of zero or more grouping expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="having-jakarta.persistence.criteria.Expression-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>having</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;having(<a href="../../../jakarta/persistence/criteria/Expression.html" title="interface in jakarta.persistence.criteria">Expression</a>&lt;java.lang.Boolean&gt;&nbsp;restriction)</pre>
<div class="block">Specify a restriction over the groups of the query.
Replaces the previous having restriction(s), if any.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#having-jakarta.persistence.criteria.Expression-">having</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>restriction</code> - a simple or compound boolean expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="having-jakarta.persistence.criteria.Predicate...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>having</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;having(<a href="../../../jakarta/persistence/criteria/Predicate.html" title="interface in jakarta.persistence.criteria">Predicate</a>...&nbsp;restrictions)</pre>
<div class="block">Specify restrictions over the groups of the query
according the conjunction of the specified restriction
predicates.
Replaces the previously added having restriction(s), if any.
If no restrictions are specified, any previously added
restrictions are simply removed.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#having-jakarta.persistence.criteria.Predicate...-">having</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>restrictions</code> - zero or more restriction predicates</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="orderBy-jakarta.persistence.criteria.Order...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>orderBy</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;orderBy(<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>...&nbsp;o)</pre>
<div class="block">Specify the ordering expressions that are used to
order the query results.
Replaces the previous ordering expressions, if any.
If no ordering expressions are specified, the previous
ordering, if any, is simply removed, and results will
be returned in no particular order.
The left-to-right sequence of the ordering expressions
determines the precedence, whereby the leftmost has highest
precedence.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>o</code> - zero or more ordering expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="orderBy-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>orderBy</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;orderBy(java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>&gt;&nbsp;o)</pre>
<div class="block">Specify the ordering expressions that are used to
order the query results.
Replaces the previous ordering expressions, if any.
If no ordering expressions are specified, the previous
ordering, if any, is simply removed, and results will
be returned in no particular order.
The order of the ordering expressions in the list
determines the precedence, whereby the first element in the
list has highest precedence.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>o</code> - list of zero or more ordering expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query</dd>
</dl>
</li>
</ul>
<a name="distinct-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>distinct</h4>
<pre><a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="interface in jakarta.persistence.criteria">CriteriaQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;&nbsp;distinct(boolean&nbsp;distinct)</pre>
<div class="block">Specify whether duplicate query results will be eliminated.
A true value will cause duplicates to be eliminated.
A false value will cause duplicates to be retained.
If distinct has not been specified, duplicate results must
be retained.
This method only overrides the return type of the
corresponding <code>AbstractQuery</code> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html#distinct-boolean-">distinct</a></code>&nbsp;in interface&nbsp;<code><a href="../../../jakarta/persistence/criteria/AbstractQuery.html" title="interface in jakarta.persistence.criteria">AbstractQuery</a>&lt;<a href="../../../jakarta/persistence/criteria/CriteriaQuery.html" title="type parameter in CriteriaQuery">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>distinct</code> - boolean value specifying whether duplicate
results must be eliminated from the query result or
whether they must be retained</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the modified query.</dd>
</dl>
</li>
</ul>
<a name="getOrderList--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOrderList</h4>
<pre>java.util.List&lt;<a href="../../../jakarta/persistence/criteria/Order.html" title="interface in jakarta.persistence.criteria">Order</a>&gt;&nbsp;getOrderList()</pre>
<div class="block">Return the ordering expressions in order of precedence.
Returns empty list if no ordering expressions have been
specified.
Modifications to the list do not affect the query.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of ordering expressions</dd>
</dl>
</li>
</ul>
<a name="getParameters--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getParameters</h4>
<pre>java.util.Set&lt;<a href="../../../jakarta/persistence/criteria/ParameterExpression.html" title="interface in jakarta.persistence.criteria">ParameterExpression</a>&lt;?&gt;&gt;&nbsp;getParameters()</pre>
<div class="block">Return the parameters of the query. Returns empty set if
there are no parameters.
Modifications to the set do not affect the query.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the query parameters</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../jakarta/persistence/criteria/CriteriaDelete.html" title="interface in jakarta.persistence.criteria"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/persistence/criteria/CriteriaUpdate.html" title="interface in jakarta.persistence.criteria"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/persistence/criteria/CriteriaQuery.html" target="_top">Frames</a></li>
<li><a href="CriteriaQuery.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>