Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

oracle.jdbc.dcn
Class DatabaseChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by oracle.jdbc.dcn.DatabaseChangeEvent
All Implemented Interfaces:
java.io.Serializable

public abstract class DatabaseChangeEvent
extends java.util.EventObject

Once you have registered your interest into certain objects in the database, you get notified when these objects change. An instance of DatabaseChangeEvent represents such a notification.

See Also:
Serialized Form

Nested Class Summary
static class DatabaseChangeEvent.AdditionalEventType
           
static class DatabaseChangeEvent.EventType
           
 
Field Summary
static java.lang.String BUILD_DATE
           
static boolean TRACE
           
 
Method Summary
abstract  DatabaseChangeEvent.AdditionalEventType getAdditionalEventType()
          Retrieve the additional event type.
abstract  java.lang.String getConnectionInformation()
          Retrieves a description of the TCP connection on which the notification was received.
abstract  java.lang.String getDatabaseName()
          Retrieves the name of the database.
abstract  DatabaseChangeEvent.EventType getEventType()
          Retrieve the event type.
abstract  QueryChangeDescription[] getQueryChangeDescription()
          For query change (EVENT_TYPE_QUERYCHANGE) kind of events, this method returns the description of the changes for each query which result has changed.
abstract  long getRegId()
          Retrieves the identification of the registration that generated this event on the server.
abstract  int getRegistrationId()
          Deprecated. Use getRegId instead.
abstract  TableChangeDescription[] getTableChangeDescription()
          For object change (EVENT_TYPE_OBJCHANGE) kind of events, this method returns the description of the changes for each table that was changed.
abstract  byte[] getTransactionId()
          Returns the id of the transaction (xid) that when committed was responsible for generating this event.
abstract  java.lang.String getTransactionId(boolean isLittleEndian)
          Returns the id of the transaction (xid) that when committed was responsible for generating this event.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values
Method Detail

getEventType

public abstract DatabaseChangeEvent.EventType getEventType()
Retrieve the event type.


getAdditionalEventType

public abstract DatabaseChangeEvent.AdditionalEventType getAdditionalEventType()
Retrieve the additional event type.


getTableChangeDescription

public abstract TableChangeDescription[] getTableChangeDescription()
For object change (EVENT_TYPE_OBJCHANGE) kind of events, this method returns the description of the changes for each table that was changed.

Returns null for other kinds of events.


getQueryChangeDescription

public abstract QueryChangeDescription[] getQueryChangeDescription()
For query change (EVENT_TYPE_QUERYCHANGE) kind of events, this method returns the description of the changes for each query which result has changed.

Returns null for other kinds of events.


getConnectionInformation

public abstract java.lang.String getConnectionInformation()
Retrieves a description of the TCP connection on which the notification was received.


getDatabaseName

public abstract java.lang.String getDatabaseName()
Retrieves the name of the database.


getRegistrationId

public abstract int getRegistrationId()
Deprecated. Use getRegId instead.

Retrieves the identification of the registration that generated this event on the server.


getRegId

public abstract long getRegId()
Retrieves the identification of the registration that generated this event on the server.


getTransactionId

public abstract byte[] getTransactionId()
Returns the id of the transaction (xid) that when committed was responsible for generating this event. This transaction id is in RAW format. It contains 8 bytes: the xid undo segment number (2 bytes), the xid slot number (2 bytes) and the xid sequence number (4 bytes). Each one of these numbers is in the server's machine endian-ness.
For example: in a local transaction, you execute: select dbms_transaction.local_transaction_id from dual and you get back 17.9.2339. You then commit this transaction which generates an event. Calling getTransactionId() on this event will return 0x11 0x00 0x09 0x00 0x23 0x09 0x00 0x00 if the server is running on a little endian platform and 0x00 0x11 0x00 0x09 0x00 0x00 0x09 0x23 if the server is big endian.

See Also:
getTransactionId(boolean)

getTransactionId

public abstract java.lang.String getTransactionId(boolean isLittleEndian)
Returns the id of the transaction (xid) that when committed was responsible for generating this event. Assuming that you know the endian-ness of the server you can call this method to retrieve the xid in a String format. For example, this method returns 17.9.2339 which is the same value as what select dbms_transaction.local_transaction_id from dual would have returned from the transaction before it was committed.

Parameters:
isLittleEndian - the endian-ness of the server. true if the server is little endian and false otherwise.
See Also:
getTransactionId

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.util.EventObject

Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

Copyright © 1998, 2007, Oracle. All rights reserved.