📄 databaseutils.html
字号:
</DL><HR><A NAME="databaseURLTipText()"><!-- --></A><H3>databaseURLTipText</H3><PRE>public java.lang.String <B>databaseURLTipText</B>()</PRE><DL><DD>Returns the tip text for this property<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="getDatabaseURL()"><!-- --></A><H3>getDatabaseURL</H3><PRE>public java.lang.String <B>getDatabaseURL</B>()</PRE><DL><DD>Get the value of DatabaseURL.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Value of DatabaseURL.</DL></DD></DL><HR><A NAME="setDatabaseURL(java.lang.String)"><!-- --></A><H3>setDatabaseURL</H3><PRE>public void <B>setDatabaseURL</B>(java.lang.String newDatabaseURL)</PRE><DL><DD>Set the value of DatabaseURL.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newDatabaseURL</CODE> - Value to assign to DatabaseURL.</DL></DD></DL><HR><A NAME="connectToDatabase()"><!-- --></A><H3>connectToDatabase</H3><PRE>public void <B>connectToDatabase</B>() throws java.lang.Exception</PRE><DL><DD>Opens a connection to the database<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="disconnectFromDatabase()"><!-- --></A><H3>disconnectFromDatabase</H3><PRE>public void <B>disconnectFromDatabase</B>() throws java.lang.Exception</PRE><DL><DD>Closes the connection to the database.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="isConnected()"><!-- --></A><H3>isConnected</H3><PRE>public boolean <B>isConnected</B>()</PRE><DL><DD>Returns true if a database connection is active.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a value of type 'boolean'</DL></DD></DL><HR><A NAME="execute(java.lang.String)"><!-- --></A><H3>execute</H3><PRE>public boolean <B>execute</B>(java.lang.String query) throws java.sql.SQLException</PRE><DL><DD>Executes a SQL query.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>query</CODE> - the SQL query<DT><B>Returns:</B><DD>true if the query generated results<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="getResultSet()"><!-- --></A><H3>getResultSet</H3><PRE>public java.sql.ResultSet <B>getResultSet</B>() throws java.sql.SQLException</PRE><DL><DD>Gets the results generated by a previous query.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the result set.<DT><B>Throws:</B><DD><CODE>java.sql.SQLException</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="tableExists(java.lang.String)"><!-- --></A><H3>tableExists</H3><PRE>public boolean <B>tableExists</B>(java.lang.String tableName) throws java.lang.Exception</PRE><DL><DD>Checks that a given table exists.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tableName</CODE> - the name of the table to look for.<DT><B>Returns:</B><DD>true if the table exists.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs.</DL></DD></DL><HR><A NAME="getResultFromTable(java.lang.String, weka.experiment.ResultProducer, java.lang.Object[])"><!-- --></A><H3>getResultFromTable</H3><PRE>public java.lang.Object[] <B>getResultFromTable</B>(java.lang.String tableName, <A HREF="../../weka/experiment/ResultProducer.html" title="interface in weka.experiment">ResultProducer</A> rp, java.lang.Object[] key) throws java.lang.Exception</PRE><DL><DD>Executes a database query to extract a result for the supplied key from the database.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tableName</CODE> - the name of the table where the result is stored<DD><CODE>rp</CODE> - the ResultProducer who will generate the result if required<DD><CODE>key</CODE> - the key for the result<DT><B>Returns:</B><DD>true if the result with that key is in the database already<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="putResultInTable(java.lang.String, weka.experiment.ResultProducer, java.lang.Object[], java.lang.Object[])"><!-- --></A><H3>putResultInTable</H3><PRE>public void <B>putResultInTable</B>(java.lang.String tableName, <A HREF="../../weka/experiment/ResultProducer.html" title="interface in weka.experiment">ResultProducer</A> rp, java.lang.Object[] key, java.lang.Object[] result) throws java.lang.Exception</PRE><DL><DD>Executes a database query to insert a result for the supplied key into the database.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tableName</CODE> - the name of the table where the result is stored<DD><CODE>rp</CODE> - the ResultProducer who will generate the result if required<DD><CODE>key</CODE> - the key for the result<DD><CODE>result</CODE> - the result to store<DT><B>Returns:</B><DD>true if the result with that key is in the database already<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="experimentIndexExists()"><!-- --></A><H3>experimentIndexExists</H3><PRE>public boolean <B>experimentIndexExists</B>() throws java.lang.Exception</PRE><DL><DD>Returns true if the experiment index exists.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the index exists<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="createExperimentIndex()"><!-- --></A><H3>createExperimentIndex</H3><PRE>public void <B>createExperimentIndex</B>() throws java.lang.Exception</PRE><DL><DD>Attempts to create the experiment index table<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs.</DL></DD></DL><HR><A NAME="createExperimentIndexEntry(weka.experiment.ResultProducer)"><!-- --></A><H3>createExperimentIndexEntry</H3><PRE>public java.lang.String <B>createExperimentIndexEntry</B>(<A HREF="../../weka/experiment/ResultProducer.html" title="interface in weka.experiment">ResultProducer</A> rp) throws java.lang.Exception</PRE><DL><DD>Attempts to insert a results entry for the table into the experiment index.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rp</CODE> - the ResultProducer generating the results<DT><B>Returns:</B><DD>the name of the created results table<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs.</DL></DD></DL><HR><A NAME="getResultsTableName(weka.experiment.ResultProducer)"><!-- --></A><H3>getResultsTableName</H3><PRE>public java.lang.String <B>getResultsTableName</B>(<A HREF="../../weka/experiment/ResultProducer.html" title="interface in weka.experiment">ResultProducer</A> rp) throws java.lang.Exception</PRE><DL><DD>Gets the name of the experiment table that stores results from a particular ResultProducer.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rp</CODE> - the ResultProducer<DT><B>Returns:</B><DD>the name of the table where the results for this ResultProducer are stored, or null if there is no table for this ResultProducer.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="createResultsTable(weka.experiment.ResultProducer, java.lang.String)"><!-- --></A><H3>createResultsTable</H3><PRE>public java.lang.String <B>createResultsTable</B>(<A HREF="../../weka/experiment/ResultProducer.html" title="interface in weka.experiment">ResultProducer</A> rp, java.lang.String tableName) throws java.lang.Exception</PRE><DL><DD>Creates a results table for the supplied result producer.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rp</CODE> - the ResultProducer generating the results<DD><CODE>tableName</CODE> - the name of the resultsTable<DT><B>Returns:</B><DD>the name of the created results table<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs.</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=3 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/experiment/DatabaseResultProducer.html" title="class in weka.experiment"><B>PREV CLASS</B></A> <A HREF="../../weka/experiment/Experiment.html" title="class in weka.experiment"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="DatabaseUtils.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -