public class QueryExecuteEvent extends EventObject
QueryExecuteListener
,
Serialized FormConstructor and Description |
---|
QueryExecuteEvent(Object source,
DbUtils utils,
String query,
int rows,
ResultSet rs,
Exception ex)
constructs the event
|
Modifier and Type | Method and Description |
---|---|
boolean |
failed()
is TRUE in case the exception is not NULL, i.e.
|
DbUtils |
getDbUtils()
returns the DbUtils instance that was executed the query
|
Exception |
getException()
returns the exception, if one happened, otherwise NULL
|
int |
getMaxRows()
returns the maximum number of rows to retrieve.
|
String |
getQuery()
returns the query that was executed
|
ResultSet |
getResultSet()
returns the resultset that was produced, can be null in case the query
failed
|
boolean |
hasResult()
whether a ResultSet was produced, e.g.
|
String |
toString()
returns the event in a string representation
|
getSource
public QueryExecuteEvent(Object source, DbUtils utils, String query, int rows, ResultSet rs, Exception ex)
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 occurredpublic DbUtils getDbUtils()
public String getQuery()
public int getMaxRows()
public boolean failed()
public boolean hasResult()
public ResultSet getResultSet()
public Exception getException()
public String toString()
toString
in class EventObject
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.