⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 query.html

📁 非常好的 Hibernate中文API ,供各位开发参考
💻 HTML
📖 第 1 页 / 共 5 页
字号:
scroll</H3>
<PRE>
public <A HREF="../../org/hibernate/ScrollableResults.html" title="interface in org.hibernate">ScrollableResults</A> <B>scroll</B>(<A HREF="../../org/hibernate/ScrollMode.html" title="class in org.hibernate">ScrollMode</A>&nbsp;scrollMode)                         throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the query results as <tt>ScrollableResults</tt>. The scrollability of the returned results depends upon JDBC driver support for scrollable <tt>ResultSet</tt>s.<br>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the result iterator<DT><B>Throws:</B><DD><CODE><A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../org/hibernate/ScrollableResults.html" title="interface in org.hibernate"><CODE>ScrollableResults</CODE></A>, <A HREF="../../org/hibernate/ScrollMode.html" title="class in org.hibernate"><CODE>ScrollMode</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="list()"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>list</B>()          throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the query results as a <tt>List</tt>. If the query contains multiple results pre row, the results are returned in an instance of <tt>Object[]</tt>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the result list<DT><B>Throws:</B><DD><CODE><A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="uniqueResult()"><!-- --></A><H3>
uniqueResult</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>uniqueResult</B>()                    throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Convenience method to return a single instance that matches the query, or null if the query returns no results.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the single result or <tt>null</tt><DT><B>Throws:</B><DD><CODE><A HREF="../../org/hibernate/NonUniqueResultException.html" title="class in org.hibernate">NonUniqueResultException</A></CODE> - if there is more than one matching result<DD><CODE><A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="executeUpdate()"><!-- --></A><H3>
executeUpdate</H3>
<PRE>
public int <B>executeUpdate</B>()                  throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Execute the update or delete statement. </p> The semantics are compliant with the ejb3 Query.executeUpdate() method.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The number of entities updated or deleted.<DT><B>Throws:</B><DD><CODE><A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxResults(int)"><!-- --></A><H3>
setMaxResults</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setMaxResults</B>(int&nbsp;maxResults)</PRE>
<DL>
<DD>Set the maximum number of rows to retrieve. If not set, there is no limit to the number of rows retrieved.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>maxResults</CODE> - the maximum number of rows</DL>
</DD>
</DL>
<HR>

<A NAME="setFirstResult(int)"><!-- --></A><H3>
setFirstResult</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setFirstResult</B>(int&nbsp;firstResult)</PRE>
<DL>
<DD>Set the first row to retrieve. If not set, rows will be retrieved beginnning from row <tt>0</tt>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>firstResult</CODE> - a row number, numbered from <tt>0</tt></DL>
</DD>
</DL>
<HR>

<A NAME="setReadOnly(boolean)"><!-- --></A><H3>
setReadOnly</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setReadOnly</B>(boolean&nbsp;readOnly)</PRE>
<DL>
<DD>Entities retrieved by this query will be loaded in  a read-only mode where Hibernate will never dirty-check them or make changes persistent.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCacheable(boolean)"><!-- --></A><H3>
setCacheable</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setCacheable</B>(boolean&nbsp;cacheable)</PRE>
<DL>
<DD>Enable caching of this query result set.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheable</CODE> - Should the query results be cacheable?</DL>
</DD>
</DL>
<HR>

<A NAME="setCacheRegion(java.lang.String)"><!-- --></A><H3>
setCacheRegion</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setCacheRegion</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;cacheRegion)</PRE>
<DL>
<DD>Set the name of the cache region.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheRegion</CODE> - the name of a query cache region, or <tt>null</tt> for the default query cache</DL>
</DD>
</DL>
<HR>

<A NAME="setTimeout(int)"><!-- --></A><H3>
setTimeout</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setTimeout</B>(int&nbsp;timeout)</PRE>
<DL>
<DD>Set a timeout for the underlying JDBC query.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout in seconds</DL>
</DD>
</DL>
<HR>

<A NAME="setFetchSize(int)"><!-- --></A><H3>
setFetchSize</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setFetchSize</B>(int&nbsp;fetchSize)</PRE>
<DL>
<DD>Set a fetch size for the underlying JDBC query.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fetchSize</CODE> - the fetch size</DL>
</DD>
</DL>
<HR>

<A NAME="setLockMode(java.lang.String, org.hibernate.LockMode)"><!-- --></A><H3>
setLockMode</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setLockMode</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;alias,                         <A HREF="../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A>&nbsp;lockMode)</PRE>
<DL>
<DD>Set the lockmode for the objects idententified by the given alias that appears in the <tt>FROM</tt> clause.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>alias</CODE> - a query alias, or <tt>this</tt> for a collection filter</DL>
</DD>
</DL>
<HR>

<A NAME="setComment(java.lang.String)"><!-- --></A><H3>
setComment</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setComment</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;comment)</PRE>
<DL>
<DD>Add a comment to the generated SQL.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comment</CODE> - a human-readable string</DL>
</DD>
</DL>
<HR>

<A NAME="setFlushMode(org.hibernate.FlushMode)"><!-- --></A><H3>
setFlushMode</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setFlushMode</B>(<A HREF="../../org/hibernate/FlushMode.html" title="class in org.hibernate">FlushMode</A>&nbsp;flushMode)</PRE>
<DL>
<DD>Override the current session flush mode, just for this query.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../org/hibernate/FlushMode.html" title="class in org.hibernate"><CODE>FlushMode</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCacheMode(org.hibernate.CacheMode)"><!-- --></A><H3>
setCacheMode</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setCacheMode</B>(<A HREF="../../org/hibernate/CacheMode.html" title="class in org.hibernate">CacheMode</A>&nbsp;cacheMode)</PRE>
<DL>
<DD>Override the current session cache mode, just for this query.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../org/hibernate/CacheMode.html" title="class in org.hibernate"><CODE>CacheMode</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setParameter(int, java.lang.Object, org.hibernate.type.Type)"><!-- --></A><H3>
setParameter</H3>
<PRE>
public <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A> <B>setParameter</B>(int&nbsp;position,                    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -