com.sleepycat.je
Class ForeignKeyTrigger

java.lang.Object
  extended by com.sleepycat.je.ForeignKeyTrigger
All Implemented Interfaces:
DatabaseTrigger

 class ForeignKeyTrigger
extends Object
implements DatabaseTrigger


Constructor Summary
ForeignKeyTrigger(SecondaryDatabase secDb)
           
 
Method Summary
 void databaseUpdated(Database db, Locker locker, DatabaseEntry priKey, DatabaseEntry oldData, DatabaseEntry newData)
          Notifies the trigger that a put or delete operation has been performed on the database.
 void triggerAdded(Database db)
          Notifies the trigger that it has been added and will start receiving update notifications.
 void triggerRemoved(Database db)
          Notifies the trigger that it has been removed and will stop receiving update notifications.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForeignKeyTrigger

ForeignKeyTrigger(SecondaryDatabase secDb)
Method Detail

triggerAdded

public void triggerAdded(Database db)
Description copied from interface: DatabaseTrigger
Notifies the trigger that it has been added and will start receiving update notifications.

Specified by:
triggerAdded in interface DatabaseTrigger
Parameters:
db - the database to which the trigger was added.

triggerRemoved

public void triggerRemoved(Database db)
Description copied from interface: DatabaseTrigger
Notifies the trigger that it has been removed and will stop receiving update notifications.

Specified by:
triggerRemoved in interface DatabaseTrigger
Parameters:
db - the database from which the trigger was removed.

databaseUpdated

public void databaseUpdated(Database db,
                            Locker locker,
                            DatabaseEntry priKey,
                            DatabaseEntry oldData,
                            DatabaseEntry newData)
                     throws DatabaseException
Description copied from interface: DatabaseTrigger
Notifies the trigger that a put or delete operation has been performed on the database.

When a new entry is inserted, oldData will be null and newData will be non-null.

When an existing entry is updated, oldData and newData will be non-null.

When an existing entry is deleted, oldData will be non-null and newData will be null.

Specified by:
databaseUpdated in interface DatabaseTrigger
Parameters:
db - the database that was modified.
locker - the internal locker.
priKey - the primary key, which is never null.
oldData - the primary data before the change, or null if the record did not previously exist.
newData - the primary data after the change, or null if the record has been deleted.
Throws:
DatabaseException


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.