类 QueryExecuteEvent
java.lang.Object
java.util.EventObject
weka.gui.sql.event.QueryExecuteEvent
- 所有已实现的接口:
Serializable
An event that is generated when a query is executed.
- 版本:
- $Revision: 7059 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
failed()
is TRUE in case the exception is not NULL, i.e.returns the DbUtils instance that was executed the queryreturns the exception, if one happened, otherwise NULLint
returns the maximum number of rows to retrieve.getQuery()
returns the query that was executedreturns the resultset that was produced, can be null in case the query failedboolean
whether a ResultSet was produced, e.g.toString()
returns the event in a string representation从类继承的方法 java.util.EventObject
getSource
-
构造器详细资料
-
QueryExecuteEvent
public QueryExecuteEvent(Object source, DbUtils utils, String query, int rows, ResultSet rs, Exception ex) constructs the event- 参数:
source
- the source that generated this eventutils
- the DbUtils instance that connected to the DBquery
- the query that is the basis for the resultsetrows
- the maximum number of rows to retrieve (0 for all)rs
- the ResultSet that was produced (depending on the type of SQL query it can also be NULL)ex
- in case an exception occurred
-
-
方法详细资料
-
getDbUtils
returns the DbUtils instance that was executed the query -
getQuery
returns the query that was executed -
getMaxRows
public int getMaxRows()returns the maximum number of rows to retrieve. 0 means all. -
failed
public boolean failed()is TRUE in case the exception is not NULL, i.e. the query failed -
hasResult
public boolean hasResult()whether a ResultSet was produced, e.g. DDL commands like delete, drop or update do not produce one. -
getResultSet
returns the resultset that was produced, can be null in case the query failed -
getException
returns the exception, if one happened, otherwise NULL -
toString
returns the event in a string representation- 覆盖:
toString
在类中EventObject
- 返回:
- the event in a string representation
-