1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/lib/api/doctrine/orm/abstractquery.html
2010-04-14 17:13:14 +02:00

732 lines
29 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:04 +0000">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
<link rel="start" href="../../overview-summary.html">
<title>AbstractQuery (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="../../doctrine/orm/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../doctrine/orm/package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../index.html" target="_top">Frames</a>
<a href="../../doctrine/orm/abstractquery.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\ORM\AbstractQuery</div>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 40</div>
<h1>Class AbstractQuery</h1>
<pre class="tree"><strong>AbstractQuery</strong><br /></pre>
<hr>
<p class="signature">public abstract class <strong>AbstractQuery</strong></p>
<div class="comment" id="overview_description"><p>Base contract for ORM queries. Base class for Query and NativeQuery.</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision$</dd>
<dt>Author:</dt>
<dd>Benjamin Eberlei <kontakt@beberlei.de></dd>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
<dd>Konsta Vesterinen <kvesteri@cc.hut.fi></dd>
</dl>
<hr>
<table id="summary_field">
<tr><th colspan="2">Field Summary</th></tr>
<tr>
<td class="type">final int</td>
<td class="description"><p class="name"><a href="#HYDRATE_ARRAY">HYDRATE_ARRAY</a></p><p class="description">Hydrates an array graph.</p></td>
</tr>
<tr>
<td class="type">final int</td>
<td class="description"><p class="name"><a href="#HYDRATE_OBJECT">HYDRATE_OBJECT</a></p><p class="description">Hydrates an object graph. </p></td>
</tr>
<tr>
<td class="type">final int</td>
<td class="description"><p class="name"><a href="#HYDRATE_SCALAR">HYDRATE_SCALAR</a></p><p class="description">Hydrates a flat, rectangular result set with scalar values.</p></td>
</tr>
<tr>
<td class="type">final int</td>
<td class="description"><p class="name"><a href="#HYDRATE_SINGLE_SCALAR">HYDRATE_SINGLE_SCALAR</a></p><p class="description">Hydrates a single scalar value.</p></td>
</tr>
<tr>
<td class="type">protected Doctrine\ORM\EntityManager The entity manager used by this query object.</td>
<td class="description"><p class="name"><a href="#_em">$_em</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected boolean Boolean value that indicates whether or not expire the result cache.</td>
<td class="description"><p class="name"><a href="#_expireResultCache">$_expireResultCache</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected array The map of query hints.</td>
<td class="description"><p class="name"><a href="#_hints">$_hints</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected integer The hydration mode.</td>
<td class="description"><p class="name"><a href="#_hydrationMode">$_hydrationMode</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected array The parameter type map of this query.</td>
<td class="description"><p class="name"><a href="#_paramTypes">$_paramTypes</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected array The parameter map of this query.</td>
<td class="description"><p class="name"><a href="#_params">$_params</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected CacheDriver</td>
<td class="description"><p class="name"><a href="#_resultCacheDriver">$_resultCacheDriver</a></p><p class="description">The locally set cache driver used for caching result sets of this query.</p></td>
</tr>
<tr>
<td class="type">protected string The id to store the result cache entry under.</td>
<td class="description"><p class="name"><a href="#_resultCacheId">$_resultCacheId</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected int Result Cache lifetime.</td>
<td class="description"><p class="name"><a href="#_resultCacheTTL">$_resultCacheTTL</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected ResultSetMapping The user-specified ResultSetMapping to use.</td>
<td class="description"><p class="name"><a href="#_resultSetMapping">$_resultSetMapping</a></p><p class="description"></p></td>
</tr>
<tr>
<td class="type">protected boolean</td>
<td class="description"><p class="name"><a href="#_useResultCache">$_useResultCache</a></p><p class="description">Boolean flag for whether or not to cache the results of this query.</p></td>
</tr>
</table>
<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#AbstractQuery()">AbstractQuery</a>(mixed em, Doctrine\ORM\EntityManager entityManager)</p><p class="description">Initializes a new instance of a class derived from AbstractQuery.</p></td>
</tr>
</table>
<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#execute()">execute</a>(string params, integer hydrationMode)</p><p class="description">Executes the query.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#expireResultCache()">expireResultCache</a>(boolean expire)</p><p class="description">Defines if the result cache is active or not.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#free()">free</a>()</p><p class="description">Frees the resources used by the query object.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getArrayResult()">getArrayResult</a>()</p><p class="description">Gets the array of results for the query.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\EntityManager</td>
<td class="description"><p class="name"><a href="#getEntityManager()">getEntityManager</a>()</p><p class="description">Retrieves the associated EntityManager of this Query instance.</p></td>
</tr>
<tr>
<td class="type"> boolean</td>
<td class="description"><p class="name"><a href="#getExpireResultCache()">getExpireResultCache</a>()</p><p class="description">Retrieves if the resultset cache is active or not.</p></td>
</tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#getHint()">getHint</a>(string name)</p><p class="description">Gets the value of a query hint. </p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getHydrationMode()">getHydrationMode</a>()</p><p class="description">Gets the hydration mode currently used by the query.</p></td>
</tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#getParameter()">getParameter</a>(mixed key)</p><p class="description">Gets a query parameter.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getParameters()">getParameters</a>()</p><p class="description">Get all defined parameters.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getResult()">getResult</a>(mixed hydrationMode)</p><p class="description">Gets the list of results for the query.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\Common\Cache\Cache</td>
<td class="description"><p class="name"><a href="#getResultCacheDriver()">getResultCacheDriver</a>()</p><p class="description">Returns the cache driver used for caching result sets.</p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getResultCacheLifetime()">getResultCacheLifetime</a>()</p><p class="description">Retrieves the lifetime of resultset cache.</p></td>
</tr>
<tr>
<td class="type">abstract string</td>
<td class="description"><p class="name"><a href="#getSQL()">getSQL</a>()</p><p class="description">Gets the SQL query that corresponds to this query object.
</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getScalarResult()">getScalarResult</a>()</p><p class="description">Gets the scalar results for the query.
</p></td>
</tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#getSingleResult()">getSingleResult</a>(integer hydrationMode)</p><p class="description">Gets the single result of the query.
</p></td>
</tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#getSingleScalarResult()">getSingleScalarResult</a>()</p><p class="description">Gets the single scalar result of the query.
</p></td>
</tr>
<tr>
<td class="type"> <a href="../../doctrine/orm/internal/hydration/iterableresult.html">IterableResult</a></td>
<td class="description"><p class="name"><a href="#iterate()">iterate</a>(array params, integer hydrationMode)</p><p class="description">Executes the query and returns an IterableResult that can be used to incrementally
iterate over the result.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setHint()">setHint</a>(string name, mixed value)</p><p class="description">Sets a query hint. </p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setHydrationMode()">setHydrationMode</a>(integer hydrationMode)</p><p class="description">Defines the processing mode to be used during hydration / result set transformation.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setParameter()">setParameter</a>(string|integer key, mixed value, string type)</p><p class="description">Sets a query parameter.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setParameters()">setParameters</a>(array params, array types)</p><p class="description">Sets a collection of query parameters.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setResultCacheDriver()">setResultCacheDriver</a>(mixed resultCacheDriver, Doctrine\Common\Cache\Cache driver)</p><p class="description">Defines a cache driver to be used for caching result sets.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setResultCacheId()">setResultCacheId</a>(string id)</p><p class="description">Set the result cache id to use to store the result set cache entry.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setResultCacheLifetime()">setResultCacheLifetime</a>(integer timeToLive)</p><p class="description">Defines how long the result cache will be active before expire.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\AbstractQuery</td>
<td class="description"><p class="name"><a href="#setResultSetMapping()">setResultSetMapping</a>(<a href="../../doctrine/orm/query/resultsetmapping.html">ResultSetMapping</a> rsm)</p><p class="description">Sets the ResultSetMapping that should be used for hydration.</p></td>
</tr>
<tr>
<td class="type"> This</td>
<td class="description"><p class="name"><a href="#useResultCache()">useResultCache</a>(boolean bool, integer timeToLive, string resultCacheId)</p><p class="description">Set whether or not to cache the results of this query and if so, for
how long and which ID to use for the cache entry.</p></td>
</tr>
</table>
<h2 id="detail_field">Field Detail</h2>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 50</div>
<h3 id="HYDRATE_ARRAY">HYDRATE_ARRAY</h3>
<code class="signature">public final int <strong>HYDRATE_ARRAY</strong> = 2</code>
<div class="details">
<p>Hydrates an array graph.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 46</div>
<h3 id="HYDRATE_OBJECT">HYDRATE_OBJECT</h3>
<code class="signature">public final int <strong>HYDRATE_OBJECT</strong> = 1</code>
<div class="details">
<p>Hydrates an object graph. This is the default behavior.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 54</div>
<h3 id="HYDRATE_SCALAR">HYDRATE_SCALAR</h3>
<code class="signature">public final int <strong>HYDRATE_SCALAR</strong> = 3</code>
<div class="details">
<p>Hydrates a flat, rectangular result set with scalar values.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 58</div>
<h3 id="HYDRATE_SINGLE_SCALAR">HYDRATE_SINGLE_SCALAR</h3>
<code class="signature">public final int <strong>HYDRATE_SINGLE_SCALAR</strong> = 4</code>
<div class="details">
<p>Hydrates a single scalar value.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 78</div>
<h3 id="_em">_em</h3>
<code class="signature">protected Doctrine\ORM\EntityManager The entity manager used by this query object. <strong>$_em</strong></code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 112</div>
<h3 id="_expireResultCache">_expireResultCache</h3>
<code class="signature">protected boolean Boolean value that indicates whether or not expire the result cache. <strong>$_expireResultCache</strong> = false</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 83</div>
<h3 id="_hints">_hints</h3>
<code class="signature">protected array The map of query hints. <strong>$_hints</strong> = array()</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 88</div>
<h3 id="_hydrationMode">_hydrationMode</h3>
<code class="signature">protected integer The hydration mode. <strong>$_hydrationMode</strong> = self::HYDRATE_OBJECT</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 68</div>
<h3 id="_paramTypes">_paramTypes</h3>
<code class="signature">protected array The parameter type map of this query. <strong>$_paramTypes</strong> = array()</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 63</div>
<h3 id="_params">_params</h3>
<code class="signature">protected array The parameter map of this query. <strong>$_params</strong> = array()</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 95</div>
<h3 id="_resultCacheDriver">_resultCacheDriver</h3>
<code class="signature">protected CacheDriver <strong>$_resultCacheDriver</strong></code>
<div class="details">
<p>The locally set cache driver used for caching result sets of this query.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 107</div>
<h3 id="_resultCacheId">_resultCacheId</h3>
<code class="signature">protected string The id to store the result cache entry under. <strong>$_resultCacheId</strong></code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 117</div>
<h3 id="_resultCacheTTL">_resultCacheTTL</h3>
<code class="signature">protected int Result Cache lifetime. <strong>$_resultCacheTTL</strong></code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 73</div>
<h3 id="_resultSetMapping">_resultSetMapping</h3>
<code class="signature">protected ResultSetMapping The user-specified ResultSetMapping to use. <strong>$_resultSetMapping</strong></code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 102</div>
<h3 id="_useResultCache">_useResultCache</h3>
<code class="signature">protected boolean <strong>$_useResultCache</strong></code>
<div class="details">
<p>Boolean flag for whether or not to cache the results of this query.</p></div>
<hr>
<h2 id="detail_constr">Constructor Detail</h2>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 124</div>
<h3 id="AbstractQuery()">AbstractQuery</h3>
<code class="signature">public <strong>AbstractQuery</strong>(mixed em, Doctrine\ORM\EntityManager entityManager)</code>
<div class="details">
<p>Initializes a new instance of a class derived from <tt>AbstractQuery</tt>.</p></div>
<hr>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 477</div>
<h3 id="execute()">execute</h3>
<code class="signature">public mixed <strong>execute</strong>(string params, integer hydrationMode)</code>
<div class="details">
<p>Executes the query.</p><dl>
<dt>Parameters:</dt>
<dd>params - Any additional query parameters.</dd>
<dd>hydrationMode - Processing mode to be used during the hydration process.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 312</div>
<h3 id="expireResultCache()">expireResultCache</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>expireResultCache</strong>(boolean expire)</code>
<div class="details">
<p>Defines if the result cache is active or not.</p><dl>
<dt>Parameters:</dt>
<dd>expire - Whether or not to force resultset cache expiration.</dd>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 142</div>
<h3 id="free()">free</h3>
<code class="signature">public void <strong>free</strong>()</code>
<div class="details">
<p>Frees the resources used by the query object.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 370</div>
<h3 id="getArrayResult()">getArrayResult</h3>
<code class="signature">public array <strong>getArrayResult</strong>()</code>
<div class="details">
<p>Gets the array of results for the query.</p><p>Alias for execute(array(), HYDRATE_ARRAY).</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 134</div>
<h3 id="getEntityManager()">getEntityManager</h3>
<code class="signature">public Doctrine\ORM\EntityManager <strong>getEntityManager</strong>()</code>
<div class="details">
<p>Retrieves the associated EntityManager of this Query instance.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 323</div>
<h3 id="getExpireResultCache()">getExpireResultCache</h3>
<code class="signature">public boolean <strong>getExpireResultCache</strong>()</code>
<div class="details">
<p>Retrieves if the resultset cache is active or not.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 450</div>
<h3 id="getHint()">getHint</h3>
<code class="signature">public mixed <strong>getHint</strong>(string name)</code>
<div class="details">
<p>Gets the value of a query hint. If the hint name is not recognized, FALSE is returned.</p><dl>
<dt>Parameters:</dt>
<dd>name - The name of the hint.</dd>
<dt>Returns:</dt>
<dd>The value of the hint or FALSE, if the hint name is not recognized.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 346</div>
<h3 id="getHydrationMode()">getHydrationMode</h3>
<code class="signature">public integer <strong>getHydrationMode</strong>()</code>
<div class="details">
<p>Gets the hydration mode currently used by the query.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 163</div>
<h3 id="getParameter()">getParameter</h3>
<code class="signature">public mixed <strong>getParameter</strong>(mixed key)</code>
<div class="details">
<p>Gets a query parameter.</p><dl>
<dt>Parameters:</dt>
<dd>key - The key (index or name) of the bound parameter.</dd>
<dt>Returns:</dt>
<dd>The value of the bound parameter.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 152</div>
<h3 id="getParameters()">getParameters</h3>
<code class="signature">public array <strong>getParameters</strong>()</code>
<div class="details">
<p>Get all defined parameters.</p><dl>
<dt>Returns:</dt>
<dd>The defined query parameters.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 358</div>
<h3 id="getResult()">getResult</h3>
<code class="signature">public array <strong>getResult</strong>(mixed hydrationMode)</code>
<div class="details">
<p>Gets the list of results for the query.</p><p>Alias for execute(array(), $hydrationMode = HYDRATE_OBJECT).</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 250</div>
<h3 id="getResultCacheDriver()">getResultCacheDriver</h3>
<code class="signature">public Doctrine\Common\Cache\Cache <strong>getResultCacheDriver</strong>()</code>
<div class="details">
<p>Returns the cache driver used for caching result sets.</p><dl>
<dt>Returns:</dt>
<dd>Cache driver</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 301</div>
<h3 id="getResultCacheLifetime()">getResultCacheLifetime</h3>
<code class="signature">public integer <strong>getResultCacheLifetime</strong>()</code>
<div class="details">
<p>Retrieves the lifetime of resultset cache.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 175</div>
<h3 id="getSQL()">getSQL</h3>
<code class="signature">public abstract string <strong>getSQL</strong>()</code>
<div class="details">
<p>Gets the SQL query that corresponds to this query object.
The returned SQL syntax depends on the connection driver that is used
by this query object at the time of this method call.</p><dl>
<dt>Returns:</dt>
<dd>SQL query</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 382</div>
<h3 id="getScalarResult()">getScalarResult</h3>
<code class="signature">public array <strong>getScalarResult</strong>()</code>
<div class="details">
<p>Gets the scalar results for the query.</p><p>Alias for execute(array(), HYDRATE_SCALAR).</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 400</div>
<h3 id="getSingleResult()">getSingleResult</h3>
<code class="signature">public mixed <strong>getSingleResult</strong>(integer hydrationMode)</code>
<div class="details">
<p>Gets the single result of the query.</p><p>Enforces the presence as well as the uniqueness of the result.</p><p>If the result is not unique, a NonUniqueResultException is thrown.
If there is no result, a NoResultException is thrown.</p><dl>
<dt>Throws:</dt>
<dd><a href="../../doctrine/orm/nonuniqueresultexception.html">If the query result is not unique.</a></dd>
<dd><a href="../../doctrine/orm/noresultexception.html">If the query returned no result.</a></dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 426</div>
<h3 id="getSingleScalarResult()">getSingleScalarResult</h3>
<code class="signature">public mixed <strong>getSingleScalarResult</strong>()</code>
<div class="details">
<p>Gets the single scalar result of the query.</p><p>Alias for getSingleResult(HYDRATE_SINGLE_SCALAR).</p><dl>
<dt>Throws:</dt>
<dd><a href="../../doctrine/orm/query/queryexception.html">If the query result is not unique.</a></dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 463</div>
<h3 id="iterate()">iterate</h3>
<code class="signature">public <a href="../../doctrine/orm/internal/hydration/iterableresult.html">IterableResult</a> <strong>iterate</strong>(array params, integer hydrationMode)</code>
<div class="details">
<p>Executes the query and returns an IterableResult that can be used to incrementally
iterate over the result.</p><dl>
<dt>Parameters:</dt>
<dd>params - The query parameters.</dd>
<dd>hydrationMode - The hydration mode to use.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 438</div>
<h3 id="setHint()">setHint</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setHint</strong>(string name, mixed value)</code>
<div class="details">
<p>Sets a query hint. If the hint name is not recognized, it is silently ignored.</p><dl>
<dt>Parameters:</dt>
<dd>name - The name of the hint.</dd>
<dd>value - The value of the hint.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 335</div>
<h3 id="setHydrationMode()">setHydrationMode</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setHydrationMode</strong>(integer hydrationMode)</code>
<div class="details">
<p>Defines the processing mode to be used during hydration / result set transformation.</p><dl>
<dt>Parameters:</dt>
<dd>hydrationMode - Doctrine processing mode to be used during hydration process. One of the Query::HYDRATE_* constants.</dd>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 187</div>
<h3 id="setParameter()">setParameter</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setParameter</strong>(string|integer key, mixed value, string type)</code>
<div class="details">
<p>Sets a query parameter.</p><dl>
<dt>Parameters:</dt>
<dd>key - The parameter position or name.</dd>
<dd>value - The parameter value.</dd>
<dd>type - The parameter type. If specified, the given value will be run through the type conversion of this type. This is usually not needed for strings and numeric types.</dd>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 203</div>
<h3 id="setParameters()">setParameters</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setParameters</strong>(array params, array types)</code>
<div class="details">
<p>Sets a collection of query parameters.</p><dl>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 233</div>
<h3 id="setResultCacheDriver()">setResultCacheDriver</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setResultCacheDriver</strong>(mixed resultCacheDriver, Doctrine\Common\Cache\Cache driver)</code>
<div class="details">
<p>Defines a cache driver to be used for caching result sets.</p><dl>
<dt>Parameters:</dt>
<dd>driver - Cache driver</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 541</div>
<h3 id="setResultCacheId()">setResultCacheId</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setResultCacheId</strong>(string id)</code>
<div class="details">
<p>Set the result cache id to use to store the result set cache entry.
If this is not explicitely set by the developer then a hash is automatically
generated for you.</p><dl>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 286</div>
<h3 id="setResultCacheLifetime()">setResultCacheLifetime</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setResultCacheLifetime</strong>(integer timeToLive)</code>
<div class="details">
<p>Defines how long the result cache will be active before expire.</p><dl>
<dt>Parameters:</dt>
<dd>timeToLive - How long the cache entry is valid.</dd>
<dt>Returns:</dt>
<dd>This query instance.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 221</div>
<h3 id="setResultSetMapping()">setResultSetMapping</h3>
<code class="signature">public Doctrine\ORM\AbstractQuery <strong>setResultSetMapping</strong>(<a href="../../doctrine/orm/query/resultsetmapping.html">ResultSetMapping</a> rsm)</code>
<div class="details">
<p>Sets the ResultSetMapping that should be used for hydration.</p></div>
<hr>
<div class="location">/Doctrine/ORM/AbstractQuery.php at line 268</div>
<h3 id="useResultCache()">useResultCache</h3>
<code class="signature">public This <strong>useResultCache</strong>(boolean bool, integer timeToLive, string resultCacheId)</code>
<div class="details">
<p>Set whether or not to cache the results of this query and if so, for
how long and which ID to use for the cache entry.</p><dl>
<dt>Returns:</dt>
<dd>query instance.</dd>
</dl>
</div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="../../doctrine/orm/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../doctrine/orm/package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../index.html" target="_top">Frames</a>
<a href="../../doctrine/orm/abstractquery.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>