Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.3.5 generated on August 31 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.jdbc
Class JDBCEvent

    java.lang.Object
      |
      +--java.util.EventObject
            |
            +--com.solarmetric.jdbc.JDBCEvent

All Implemented Interfaces:
  Serializable

public class JDBCEvent
extends EventObject

A JDBC event. The event source will be the connection.

See Also:
  `JDBCListener`, Serialized Form

Field Summary
`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.

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`JDBCEvent(Connection source, short type, JDBCEvent associatedEvent, Statement statement, String sql)` Constructor.

Method Summary
`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.

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### BEFORE_PREPARE_STATEMENT

    public static final short BEFORE_PREPARE_STATEMENT

  Type code indicating that a `Statement` is being prepared.

### AFTER_PREPARE_STATEMENT

    public static final short AFTER_PREPARE_STATEMENT

  Type code indicating that a `Statement` is being prepared.

### BEFORE_CREATE_STATEMENT

    public static final short BEFORE_CREATE_STATEMENT

  Type code indicating that a `Statement` is being created.

### AFTER_CREATE_STATEMENT

    public static final short AFTER_CREATE_STATEMENT

  Type code indicating that a `Statement` is being created.

### BEFORE_EXECUTE_STATEMENT

    public static final short BEFORE_EXECUTE_STATEMENT

  Type code indicating that a `Statement` is about to be executed.

### AFTER_EXECUTE_STATEMENT

    public static final short AFTER_EXECUTE_STATEMENT

  Type code indicating that a `Statement` completed execution.

### BEFORE_COMMIT

    public static final short BEFORE_COMMIT

  Type code indicating that a `Connection` is about to be committed.

### AFTER_COMMIT

    public static final short AFTER_COMMIT

  Type code indicating that a `Connection` was just committed.

### BEFORE_ROLLBACK

    public static final short BEFORE_ROLLBACK

  Type code indicating that a rollback is about to occur.

### AFTER_ROLLBACK

    public static final short AFTER_ROLLBACK

  Type code indicating that a rollback just occured.

### AFTER_CONNECT

    public static final short AFTER_CONNECT

  Type code indicating that a connection was obtained. This does not necessarily mean that the connection is new if pooling is enabled.

### BEFORE_CLOSE

    public static final short BEFORE_CLOSE

  Type code indicating that a connection was closed. This does not necessarily mean that the underlying database connection was severed if pooling is enabled.

Constructor Detail

### JDBCEvent

    public JDBCEvent(Connection source,
                     short type,
                     JDBCEvent associatedEvent,
                     Statement statement,
                     String sql)

  Constructor.

Method Detail

### getType

    public final short getType()

  Return the event's type code.

### getConnection

    public final Connection getConnection()

  Return the Connection for this event.

### getTime

    public final long getTime()

  Return the time the event was constructed.

### getAssociatedEvent

    public final JDBCEvent getAssociatedEvent()

  Return the associated `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.

### getSQL

    public final String getSQL()

  Return the SQL associated with this event; may be null.

### getStatement

    public final Statement getStatement()

  Return the Statement for this event, may be null for events unrelated to Statement execution.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.3.5 generated on August 31 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.