query.html

来自「非常好的 Hibernate中文API ,供各位开发参考」· HTML 代码 · 共 1,186 行 · 第 1/5 页

HTML
1,186
字号
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the first row to retrieve.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setFloat(int, float)">setFloat</A></B>(int&nbsp;position,         float&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setFloat(java.lang.String, float)">setFloat</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>&nbsp;name,         float&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setFlushMode(org.hibernate.FlushMode)">setFlushMode</A></B>(<A HREF="../../org/hibernate/FlushMode.html" title="class in org.hibernate">FlushMode</A>&nbsp;flushMode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override the current session flush mode, just for this query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setInteger(int, int)">setInteger</A></B>(int&nbsp;position,           int&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setInteger(java.lang.String, int)">setInteger</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>&nbsp;name,           int&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setLocale(int, java.util.Locale)">setLocale</A></B>(int&nbsp;position,          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A>&nbsp;locale)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setLocale(java.lang.String, java.util.Locale)">setLocale</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>&nbsp;name,          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A>&nbsp;locale)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setLockMode(java.lang.String, org.hibernate.LockMode)">setLockMode</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>&nbsp;alias,            <A HREF="../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A>&nbsp;lockMode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the lockmode for the objects idententified by the given alias that appears in the <tt>FROM</tt> clause.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setLong(int, long)">setLong</A></B>(int&nbsp;position,        long&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setLong(java.lang.String, long)">setLong</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>&nbsp;name,        long&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setMaxResults(int)">setMaxResults</A></B>(int&nbsp;maxResults)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of rows to retrieve.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameter(int, java.lang.Object)">setParameter</A></B>(int&nbsp;position,             <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind a value to a JDBC-style query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameter(int, java.lang.Object, org.hibernate.type.Type)">setParameter</A></B>(int&nbsp;position,             <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;val,             <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind a value to a JDBC-style query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameter(java.lang.String, java.lang.Object)">setParameter</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>&nbsp;name,             <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind a value to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameter(java.lang.String, java.lang.Object, org.hibernate.type.Type)">setParameter</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>&nbsp;name,             <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;val,             <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind a value to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameterList(java.lang.String, java.util.Collection)">setParameterList</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>&nbsp;name,                 <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;vals)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind multiple values to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameterList(java.lang.String, java.util.Collection, org.hibernate.type.Type)">setParameterList</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>&nbsp;name,                 <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;vals,                 <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind multiple values to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameterList(java.lang.String, java.lang.Object[])">setParameterList</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>&nbsp;name,                 <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;vals)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind multiple values to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameterList(java.lang.String, java.lang.Object[], org.hibernate.type.Type)">setParameterList</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>&nbsp;name,                 <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;vals,                 <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind multiple values to a named query parameter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setParameters(java.lang.Object[], org.hibernate.type.Type[])">setParameters</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;values,              <A HREF="../../org/hibernate/type/Type.html" title="interface in org.hibernate.type">Type</A>[]&nbsp;types)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind values and types to positional parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setProperties(java.util.Map)">setProperties</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;bean)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind the values of the given Map for each named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using hueristics.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setProperties(java.lang.Object)">setProperties</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;bean)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using hueristics.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setReadOnly(boolean)">setReadOnly</A></B>(boolean&nbsp;readOnly)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Entities retrieved by this query will be loaded in  a read-only mode where Hibernate will never dirty-check them or make changes persistent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setResultTransformer(org.hibernate.transform.ResultTransformer)">setResultTransformer</A></B>(<A HREF="../../org/hibernate/transform/ResultTransformer.html" title="interface in org.hibernate.transform">ResultTransformer</A>&nbsp;transformer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a strategy for handling the query results.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setSerializable(int, java.io.Serializable)">setSerializable</A></B>(int&nbsp;position,                <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;val)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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#setSerializable(java.lang.String, java.io.Serializable)">setSerializable</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>&nbsp;name,                <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;val)</CODE>

⌨️ 快捷键说明

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