📄 databaseutils.html
字号:
<DL><DD>Get the value of DatabaseURL.<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.<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<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.<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.<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.<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.<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.<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="isKeyInTable(java.lang.String, weka.experiment.ResultProducer, java.lang.Object[])"><!-- --></A><H3>isKeyInTable</H3><PRE>protected boolean <B>isKeyInTable</B>(java.lang.String tableName, <A HREF="../../weka/experiment/ResultProducer.html">ResultProducer</A> rp, java.lang.Object[] key) throws java.lang.Exception</PRE><DL><DD>Executes a database query to see whether a result for the supplied key is already in the database.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tableName</CODE> - the name of the table to search for the key in<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="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">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.<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">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.<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.<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<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">ResultProducer</A> rp) throws java.lang.Exception</PRE><DL><DD>Attempts to insert a results entry for the table into the experiment index.<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">ResultProducer</A> rp) throws java.lang.Exception</PRE><DL><DD>Gets the name of the experiment table that stores results from a particular ResultProducer.<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">ResultProducer</A> rp, java.lang.String tableName) throws java.lang.Exception</PRE><DL><DD>Creates a results table for the supplied result producer.<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 NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</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"><B>PREV CLASS</B></A> <A HREF="../../weka/experiment/Experiment.html"><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></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -