resultdatamodel.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 510 行 · 第 1/2 页

HTML
510
字号
public <B>ResultDataModel</B>(javax.servlet.jsp.jstl.sql.Result&nbsp;result)</PRE><DL><DD><p>Construct a new <A HREF="../../../javax/faces/model/ResultDataModel.html" title="class in javax.faces.model"><CODE>ResultDataModel</CODE></A> wrapping the specified <code>Result</code>.</p><P><DL><DT><B>Parameters:</B><DD><CODE>result</CODE> - <code>Result</code> to be wrapped (if any)</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="isRowAvailable()"><!-- --></A><H3>isRowAvailable</H3><PRE>public boolean <B>isRowAvailable</B>()</PRE><DL><DD><p>Return <code>true</code> if there is <code>wrappedData</code> available, and the current value of <code>rowIndex</code> is greater than or equal to zero, and less than the length of the array returned by calling <code>getRows()</code> on the underlying <code>Result</code>. Otherwise, return <code>false</code>.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#isRowAvailable()">isRowAvailable</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row availability</DL></DD></DL><HR><A NAME="getRowCount()"><!-- --></A><H3>getRowCount</H3><PRE>public int <B>getRowCount</B>()</PRE><DL><DD><p>If there is <code>wrappedData</code> available, return the length of the array returned by calling <code>getRows()</code> on the underlying <code>Result</code>.  If no <code>wrappedData</code> is available, return -1.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#getRowCount()">getRowCount</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row count</DL></DD></DL><HR><A NAME="getRowData()"><!-- --></A><H3>getRowData</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getRowData</B>()</PRE><DL><DD><p>If row data is available, return the <code>SortedMap</code> array element at the index specified by <code>rowIndex</code> of the array returned by calling <code>getRows()</code> on the underlying <code>Result</code>.  If no wrapped data is available, return <code>null</code>.</p> <p>Note that, if a non-<code>null</code> <code>Map</code> is returned by this method, it will contain the values of the columns for the current row, keyed by column name.  Column name comparisons must be performed in a case-insensitive manner.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#getRowData()">getRowData</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row data<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if now row data is available  at the currently specified row index</DL></DD></DL><HR><A NAME="getRowIndex()"><!-- --></A><H3>getRowIndex</H3><PRE>public int <B>getRowIndex</B>()</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../javax/faces/model/DataModel.html#getRowIndex()">DataModel</A></CODE></B></DD><DD><p>Return the zero-relative index of the currently selected row.  If we are not currently positioned on a row, or no <code>wrappedData</code> is available, return -1.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#getRowIndex()">getRowIndex</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row index</DL></DD></DL><HR><A NAME="setRowIndex(int)"><!-- --></A><H3>setRowIndex</H3><PRE>public void <B>setRowIndex</B>(int&nbsp;rowIndex)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../javax/faces/model/DataModel.html#setRowIndex(int)">DataModel</A></CODE></B></DD><DD><p>Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row.  It is possible to set the row index at a value for which the underlying data collection does not contain any row data.  Therefore, callers may use the <code>isRowAvailable()</code> method to detect whether row data will be available for use by the <code>getRowData()</code> method.</p> <p>If there is no <code>wrappedData</code> available when this method is called, the specified <code>rowIndex</code> is stored (and may be retrieved by a subsequent call to <code>getRowData()</code>), but no event is sent.  Otherwise, if the currently selected row index is changed by this call, a <A HREF="../../../javax/faces/model/DataModelEvent.html" title="class in javax.faces.model"><CODE>DataModelEvent</CODE></A> will be sent to the <code>rowSelected()</code> method of all registered <A HREF="../../../javax/faces/model/DataModelListener.html" title="interface in javax.faces.model"><CODE>DataModelListener</CODE></A>s.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#setRowIndex(int)">setRowIndex</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - The new zero-relative index (must be non-negative)<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs setting the row index<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>rowIndex</code>  is less than -1</DL></DD></DL><HR><A NAME="getWrappedData()"><!-- --></A><H3>getWrappedData</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getWrappedData</B>()</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../javax/faces/model/DataModel.html#getWrappedData()">DataModel</A></CODE></B></DD><DD><p>Return the object representing the data wrapped by this <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>, if any.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#getWrappedData()">getWrappedData</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setWrappedData(java.lang.Object)"><!-- --></A><H3>setWrappedData</H3><PRE>public void <B>setWrappedData</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;data)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../javax/faces/model/DataModel.html#setWrappedData(java.lang.Object)">DataModel</A></CODE></B></DD><DD><p>Set the object representing the data collection wrapped by this <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>.  If the specified <code>data</code> is <code>null</code>, detach this <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A> from any previously wrapped data collection instead.</p> <p>If <code>data</code> is non-<code>null</code>, the currently selected row index must be set to zero, and a <A HREF="../../../javax/faces/model/DataModelEvent.html" title="class in javax.faces.model"><CODE>DataModelEvent</CODE></A> must be sent to the <code>rowSelected()</code> method of all registered <A HREF="../../../javax/faces/model/DataModelListener.html" title="interface in javax.faces.model"><CODE>DataModelListener</CODE></A>s indicating that this row is now selected.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/model/DataModel.html#setWrappedData(java.lang.Object)">setWrappedData</A></CODE> in class <CODE><A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model">DataModel</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - Data collection to be wrapped, or <code>null</code> to  detach from any previous data collection<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if <code>data</code> is  non-<code>null</code> and is not a <code>Result</code></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/faces/model/ListDataModel.html" title="class in javax.faces.model"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/faces/model/ResultSetDataModel.html" title="class in javax.faces.model"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/faces/model/ResultDataModel.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ResultDataModel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>

⌨️ 快捷键说明

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