📄 data.html
字号:
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCurrentPos(int)"><!-- --></A><H3>
setCurrentPos</H3>
<PRE>
public void <B>setCurrentPos</B>(int r)</PRE>
<DL>
<DD>Sets the current pos. If value sent to method is not a valid number, the
current position is set to one higher than the maximum.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - position to set to.</DL>
</DD>
</DL>
<HR>
<A NAME="sort(java.lang.String, boolean)"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column,
boolean asc)</PRE>
<DL>
<DD>Sorts the data using a given row as the sorting criteria. A boolean value
indicates whether to sort ascending or descending.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - name of column to use as sorting criteria.<DD><CODE>asc</CODE> - boolean value indicating whether to sort ascending or
descending. True for asc, false for desc. Currently this
feature is not enabled and all sorts are asc.</DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Gets the number of rows in the Data object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>number of rows in Data object.</DL>
</DD>
</DL>
<HR>
<A NAME="addColumnValue(java.lang.String, java.lang.Object)"><!-- --></A><H3>
addColumnValue</H3>
<PRE>
public void <B>addColumnValue</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE>
<DL>
<DD>Adds a value into the Data set at the current row, using a column name to
find the column in which to insert the new value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - the name of the column to set.<DD><CODE>value</CODE> - value to set into column.</DL>
</DD>
</DL>
<HR>
<A NAME="findValue(java.lang.String, java.lang.Object)"><!-- --></A><H3>
findValue</H3>
<PRE>
public int <B>findValue</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE>
<DL>
<DD>Returns the row number where a certain value is.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - column to be searched for value.<DD><CODE>value</CODE> - object in Search of.
<DT><B>Returns:</B><DD>row # where value exists.</DL>
</DD>
</DL>
<HR>
<A NAME="setColumnValue(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setColumnValue</H3>
<PRE>
public void <B>setColumnValue</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE>
<DL>
<DD>Sets the value in the Data set at the current row, using a column name to
find the column in which to insert the new value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - the name of the column to set.<DD><CODE>value</CODE> - value to set into column.</DL>
</DD>
</DL>
<HR>
<A NAME="hasHeader(java.lang.String)"><!-- --></A><H3>
hasHeader</H3>
<PRE>
public boolean <B>hasHeader</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column)</PRE>
<DL>
<DD>Checks to see if a column exists in the Data object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - Name of column header to check for.
<DT><B>Returns:</B><DD>True or False depending on whether the column exists.</DL>
</DD>
</DL>
<HR>
<A NAME="next()"><!-- --></A><H3>
next</H3>
<PRE>
public boolean <B>next</B>()</PRE>
<DL>
<DD>Sets the current position of the Data set to the next row.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>True if there is another row. False if there are no more rows.</DL>
</DD>
</DL>
<HR>
<A NAME="getDataFromResultSet(java.sql.ResultSet)"><!-- --></A><H3>
getDataFromResultSet</H3>
<PRE>
public static <A HREF="../../../../org/apache/jorphan/collections/Data.html" title="class in org.apache.jorphan.collections">Data</A> <B>getDataFromResultSet</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html" title="class or interface in java.sql">ResultSet</A> rs)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></PRE>
<DL>
<DD>Gets a Data object from a ResultSet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rs</CODE> - ResultSet passed in from a database query
<DT><B>Returns:</B><DD>a Data object
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="previous()"><!-- --></A><H3>
previous</H3>
<PRE>
public boolean <B>previous</B>()</PRE>
<DL>
<DD>Sets the current position of the Data set to the previous row.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>True if there is another row. False if there are no more rows.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD>Resets the current position of the data set to just before the first
element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getColumnValue(java.lang.String)"><!-- --></A><H3>
getColumnValue</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getColumnValue</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> column)</PRE>
<DL>
<DD>Gets the value in the current row of the given column.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - name of the column.
<DT><B>Returns:</B><DD>an Object which holds the value of the column.</DL>
</DD>
</DL>
<HR>
<A NAME="getColumnValue(int)"><!-- --></A><H3>
getColumnValue</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getColumnValue</B>(int column)</PRE>
<DL>
<DD>Gets the value in the current row of the given column.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>column</CODE> - index of the column (starts at 0).
<DT><B>Returns:</B><DD>an Object which holds the value of the column.</DL>
</DD>
</DL>
<HR>
<A NAME="getColumnValue(int, int)"><!-- --></A><H3>
getColumnValue</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getColumnValue</B>(int column,
int row)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeColumn(int)"><!-- --></A><H3>
removeColumn</H3>
<PRE>
public void <B>removeColumn</B>(int col)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setHeaders(java.lang.String[])"><!-- --></A><H3>
setHeaders</H3>
<PRE>
public void <B>setHeaders</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] h)</PRE>
<DL>
<DD>Sets the headers for the data set. Each header represents a column of
data. Each row's data can be gotten with the column header name, which
will always be a string.
<P>
<DD><DL>
</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -