📄 query.html
字号:
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setShort(int, short)">setShort</A></B>(int position, short val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setShort(java.lang.String, short)">setShort</A></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> name, short val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setString(int, java.lang.String)">setString</A></B>(int position, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setString(java.lang.String, java.lang.String)">setString</A></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> name, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setText(int, java.lang.String)">setText</A></B>(int position, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setText(java.lang.String, java.lang.String)">setText</A></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> name, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> val)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setTime(int, java.util.Date)">setTime</A></B>(int position, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setTime(java.lang.String, java.util.Date)">setTime</A></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> name, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setTimeout(int)">setTimeout</A></B>(int timeout)</CODE>
<BR>
Set a timeout for the underlying JDBC query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setTimestamp(int, java.util.Date)">setTimestamp</A></B>(int position, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../org/hibernate/Query.html" title="interface in org.hibernate">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#setTimestamp(java.lang.String, java.util.Date)">setTimestamp</A></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> name, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../org/hibernate/Query.html#uniqueResult()">uniqueResult</A></B>()</CODE>
<BR>
Convenience method to return a single instance that matches the query, or null if the query returns no results.</TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getQueryString()"><!-- --></A><H3>
getQueryString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getQueryString</B>()</PRE>
<DL>
<DD>Get the query string.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the query string</DL>
</DD>
</DL>
<HR>
<A NAME="getReturnTypes()"><!-- --></A><H3>
getReturnTypes</H3>
<PRE>
public <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>[] <B>getReturnTypes</B>() throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the Hibernate types of the query result set.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an array of types<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="getReturnAliases()"><!-- --></A><H3>
getReturnAliases</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getReturnAliases</B>() throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the HQL select clause aliases (if any)
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an array of aliases as strings<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="getNamedParameters()"><!-- --></A><H3>
getNamedParameters</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getNamedParameters</B>() throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the names of all named parameters of the query.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the parameter names, in no particular order<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="iterate()"><!-- --></A><H3>
iterate</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>iterate</B>() throws <A HREF="../../org/hibernate/HibernateException.html" title="class in org.hibernate">HibernateException</A></PRE>
<DL>
<DD>Return the query results as an <tt>Iterator</tt>. If the query contains multiple results pre row, the results are returned in an instance of <tt>Object[]</tt>.<br> <br> Entities returned as results are initialized on demand. The first SQL query returns identifiers only.<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></DL>
</DD>
</DL>
<HR>
<A NAME="scroll()"><!-- --></A><H3>
scroll</H3>
<PRE>
public <A HREF="../../org/hibernate/ScrollableResults.html" title="interface in org.hibernate">ScrollableResults</A> <B>scroll</B>() 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></DL>
</DD>
</DL>
<HR>
<A NAME="scroll(org.hibernate.ScrollMode)"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -