public class StatementEvent extends EventObject
StatementEvent
is sent to all StatementEventListener
s 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.
source
Constructor and Description |
---|
StatementEvent(PooledConnection con,
PreparedStatement statement)
Constructs a
StatementEvent with the specified PooledConnection and
PreparedStatement . |
StatementEvent(PooledConnection con,
PreparedStatement statement,
SQLException exception)
Constructs a
StatementEvent with the specified PooledConnection ,
PreparedStatement and SQLException |
Modifier and Type | Method and Description |
---|---|
SQLException |
getSQLException()
Returns the
SQLException the driver is about to throw |
PreparedStatement |
getStatement()
Returns the
PreparedStatement that is being closed or is invalid |
getSource, toString
public StatementEvent(PooledConnection con, PreparedStatement statement)
StatementEvent
with the specified PooledConnection
and
PreparedStatement
. The SQLException
contained in the event defaults to
null.
IllegalArgumentException
- if con
is null.con
- The PooledConnection
that the closed or invalid
PreparedStatement
is associated with.statement
- The PreparedStatement
that is being closed or is invalid
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
StatementEvent
with the specified PooledConnection
,
PreparedStatement
and SQLException
IllegalArgumentException
- if con
is null.
con
- The PooledConnection
that the closed or invalid PreparedStatement
is associated with.statement
- The PreparedStatement
that is being closed or is invalidexception
- The SQLException
the driver is about to throw to
the applicationpublic PreparedStatement getStatement()
PreparedStatement
that is being closed or is invalid
PreparedStatement
that is being closed or is invalid
public SQLException getSQLException()
SQLException
the driver is about to throw
SQLException
the driver is about to throw
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.