APIdia Launch Partner
Top Description Fields Constructors Methods
javax.sql

public Class StatementEvent

extends EventObject
Class Inheritance
Imports
java.sql.PreparedStatement, .SQLException, java.util.EventObject

A StatementEvent is sent to all StatementEventListeners which were registered with a PooledConnection. This occurs when the driver determines that a PreparedStatement that is associated with the PooledConnection has been closed or the driver determines is invalid.
Since
1.6

Field Summary

Modifier and TypeField and Description
private SQLException
pack-priv static final long
private PreparedStatement
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
StatementEvent(PooledConnection
The PooledConnection that the closed or invalid PreparedStatementis associated with.
con
,
PreparedStatement
The PreparedStatement that is being closed or is invalid
statement
)

Constructs a StatementEvent with the specified PooledConnection and PreparedStatement.

public
StatementEvent(PooledConnection
The PooledConnection that the closed or invalid PreparedStatement is associated with.
con
,
PreparedStatement
The PreparedStatement that is being closed or is invalid
statement
,
SQLException
The SQLException the driver is about to throw to the application
exception
)

Constructs a StatementEvent with the specified PooledConnection, PreparedStatement and SQLException

Method Summary

Modifier and TypeMethod and Description
public SQLException

Returns:

The SQLException the driver is about to throw
getSQLException
()

Returns the SQLException the driver is about to throw

public PreparedStatement

Returns:

The PreparedStatement that is being closed or is invalid
getStatement
()

Returns the PreparedStatement that is being closed or is invalid

Inherited from java.util.EventObject:
getSourcetoString

Field Detail

exceptionback to summary
private SQLException exception
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.util.EventObject.serialVersionUID.

statementback to summary
private PreparedStatement statement
Annotations
@SuppressWarnings:serial

Constructor Detail

StatementEventback to summary
public StatementEvent(PooledConnection con, PreparedStatement statement)

Constructs a StatementEvent with the specified PooledConnection and PreparedStatement. The SQLException contained in the event defaults to null.

Parameters
con:PooledConnection

The PooledConnection that the closed or invalid PreparedStatementis associated with.

statement:PreparedStatement

The PreparedStatement that is being closed or is invalid

Exceptions
IllegalArgumentException:
if con is null.
Since
1.6
StatementEventback to summary
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)

Constructs a StatementEvent with the specified PooledConnection, PreparedStatement and SQLException

Parameters
con:PooledConnection

The PooledConnection that the closed or invalid PreparedStatement is associated with.

statement:PreparedStatement

The PreparedStatement that is being closed or is invalid

exception:SQLException

The SQLException the driver is about to throw to the application

Exceptions
IllegalArgumentException:
if con is null.
Since
1.6

Method Detail

getSQLExceptionback to summary
public SQLException getSQLException()

Returns the SQLException the driver is about to throw

Returns:SQLException

The SQLException the driver is about to throw

Since
1.6
getStatementback to summary
public PreparedStatement getStatement()

Returns the PreparedStatement that is being closed or is invalid

Returns:PreparedStatement

The PreparedStatement that is being closed or is invalid

Since
1.6