org.apache.ojb.broker
Interface PersistenceBrokerAware


public interface PersistenceBrokerAware

This interface defines a protocol for persistent objects that must be aware of the operations of the PersistenceBroker. It defines callback methods that allows implementors to interact with persistence operations.
Non persistent objects could use the PBLifeCycleListener to be notified on PersistenceBroker operations.

Version:
$Id: PersistenceBrokerAware.java,v 1.5 2003/05/08 16:43:05 arminw Exp $
Author:
Thomas Mahler

Method Summary
 void afterDelete(PersistenceBroker broker)
          this method is called as the last operation within a call to PersistenceBroker.delete(...).
 void afterInsert(PersistenceBroker broker)
          this method is called as the last operation within an insert operation.
 void afterLookup(PersistenceBroker broker)
          this method is called as the last operation within a call to PersistenceBroker.getObjectByXXX() or PersistenceBroker.getCollectionByXXX().
 void afterUpdate(PersistenceBroker broker)
          this method is called as the last operation within an update operation.
 void beforeDelete(PersistenceBroker broker)
          this method is called as the first operation within a call to PersistenceBroker.delete(...).
 void beforeInsert(PersistenceBroker broker)
          this method is called as the first operation before perform an object insert.
 void beforeUpdate(PersistenceBroker broker)
          this method is called as the first operation before perform an object update.
 

Method Detail

beforeUpdate

public void beforeUpdate(PersistenceBroker broker)
                  throws PersistenceBrokerException
this method is called as the first operation before perform an object update.

Throws:
PersistenceBrokerException

afterUpdate

public void afterUpdate(PersistenceBroker broker)
                 throws PersistenceBrokerException
this method is called as the last operation within an update operation.

Throws:
PersistenceBrokerException

beforeInsert

public void beforeInsert(PersistenceBroker broker)
                  throws PersistenceBrokerException
this method is called as the first operation before perform an object insert.

Throws:
PersistenceBrokerException

afterInsert

public void afterInsert(PersistenceBroker broker)
                 throws PersistenceBrokerException
this method is called as the last operation within an insert operation.

Throws:
PersistenceBrokerException

beforeDelete

public void beforeDelete(PersistenceBroker broker)
                  throws PersistenceBrokerException
this method is called as the first operation within a call to PersistenceBroker.delete(...).

Throws:
PersistenceBrokerException

afterDelete

public void afterDelete(PersistenceBroker broker)
                 throws PersistenceBrokerException
this method is called as the last operation within a call to PersistenceBroker.delete(...).

Throws:
PersistenceBrokerException

afterLookup

public void afterLookup(PersistenceBroker broker)
                 throws PersistenceBrokerException
this method is called as the last operation within a call to PersistenceBroker.getObjectByXXX() or PersistenceBroker.getCollectionByXXX().

Throws:
PersistenceBrokerException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14