public class JDBCEvent extends EventObject
JDBCListener
,
Serialized FormModifier and Type | Field and Description |
---|---|
static short |
AFTER_COMMIT
Type code indicating that a
Connection was just committed. |
static short |
AFTER_CONNECT
Type code indicating that a connection was obtained.
|
static short |
AFTER_CREATE_STATEMENT
Type code indicating that a
Statement is being created. |
static short |
AFTER_EXECUTE_STATEMENT
Type code indicating that a
Statement completed execution. |
static short |
AFTER_PREPARE_STATEMENT
Type code indicating that a
Statement is being prepared. |
static short |
AFTER_ROLLBACK
Type code indicating that a rollback just occured.
|
static short |
BEFORE_CLOSE
Type code indicating that a connection was closed.
|
static short |
BEFORE_COMMIT
Type code indicating that a
Connection is about to be committed. |
static short |
BEFORE_CREATE_STATEMENT
Type code indicating that a
Statement is being created. |
static short |
BEFORE_EXECUTE_STATEMENT
Type code indicating that a
Statement is about to be executed. |
static short |
BEFORE_PREPARE_STATEMENT
Type code indicating that a
Statement is being prepared. |
static short |
BEFORE_ROLLBACK
Type code indicating that a rollback is about to occur.
|
source
Constructor and Description |
---|
JDBCEvent(Connection source,
short type,
JDBCEvent associatedEvent,
Statement statement,
String sql)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
JDBCEvent |
getAssociatedEvent()
Return the associated
JDBCEvent for this event. |
Connection |
getConnection()
Return the Connection for this event.
|
String |
getSQL()
Return the SQL associated with this event; may be null.
|
Statement |
getStatement()
Return the Statement for this event, may be null for events
unrelated to Statement execution.
|
long |
getTime()
Return the time the event was constructed.
|
short |
getType()
Return the event's type code.
|
getSource, toString
public static final short BEFORE_PREPARE_STATEMENT
Statement
is being prepared.public static final short AFTER_PREPARE_STATEMENT
Statement
is being prepared.public static final short BEFORE_CREATE_STATEMENT
Statement
is being created.public static final short AFTER_CREATE_STATEMENT
Statement
is being created.public static final short BEFORE_EXECUTE_STATEMENT
Statement
is about to be executed.public static final short AFTER_EXECUTE_STATEMENT
Statement
completed execution.public static final short BEFORE_COMMIT
Connection
is about to be committed.public static final short AFTER_COMMIT
Connection
was just committed.public static final short BEFORE_ROLLBACK
public static final short AFTER_ROLLBACK
public static final short AFTER_CONNECT
public static final short BEFORE_CLOSE
public JDBCEvent(Connection source, short type, JDBCEvent associatedEvent, Statement statement, String sql)
public final short getType()
public final Connection getConnection()
public final long getTime()
public final JDBCEvent getAssociatedEvent()
JDBCEvent
for this event.
For AFTER_XXX events, this will typically be the JDBCEvent
that was created in the BEFORE_XXX stage. This may be null when
an association is not appropriate for the event.public final String getSQL()
public final Statement getStatement()
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.