Package weka.gui.sql.event
Class QueryExecuteEvent
java.lang.Object
java.util.EventObject
weka.gui.sql.event.QueryExecuteEvent
- All Implemented Interfaces:
- Serializable
An event that is generated when a query is executed.
- Version:
- $Revision: 8034 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfailed()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 NULLintreturns 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 failedbooleanwhether a ResultSet was produced, e.g.toString()returns the event in a string representationMethods inherited from class java.util.EventObjectgetSource
- 
Constructor Details- 
QueryExecuteEventpublic QueryExecuteEvent(Object source, DbUtils utils, String query, int rows, ResultSet rs, Exception ex) constructs the event- Parameters:
- source- the source that generated this event
- utils- the DbUtils instance that connected to the DB
- query- the query that is the basis for the resultset
- rows- 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
 
 
- 
- 
Method Details- 
getDbUtilsreturns the DbUtils instance that was executed the query
- 
getQueryreturns the query that was executed
- 
getMaxRowspublic int getMaxRows()returns the maximum number of rows to retrieve. 0 means all.
- 
failedpublic boolean failed()is TRUE in case the exception is not NULL, i.e. the query failed
- 
hasResultpublic boolean hasResult()whether a ResultSet was produced, e.g. DDL commands like delete, drop or update do not produce one.
- 
getResultSetreturns the resultset that was produced, can be null in case the query failed
- 
getExceptionreturns the exception, if one happened, otherwise NULL
- 
toStringreturns the event in a string representation- Overrides:
- toStringin class- EventObject
- Returns:
- the event in a string representation
 
 
-