db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker PersistenceBrokerAware.java PersistenceBrokerEvent.java
Date Thu, 22 Dec 2005 21:14:30 GMT
tomdz       2005/12/22 13:14:30

  Modified:    src/java/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        PersistenceBrokerAware.java
                        PersistenceBrokerEvent.java
  Log:
  Updated Javadoc
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.2   +37 -25    db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerAware.java
  
  Index: PersistenceBrokerAware.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerAware.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- PersistenceBrokerAware.java	21 Dec 2005 22:22:08 -0000	1.7.2.1
  +++ PersistenceBrokerAware.java	22 Dec 2005 21:14:30 -0000	1.7.2.2
  @@ -16,61 +16,73 @@
    */
   
   /**
  - * 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.
  + * This interface defines a protocol for persistent objects that want to be aware
  + * of the operations of the persistence broker. It defines callback methods that
  + * allows implementors to interact with persistence operations.
    * <br/>
  - * Non persistent objects could use the {@link PBLifeCycleListener}
  - * to be notified on PersistenceBroker operations.
  + * Non persistent objects could use the {@link PBLifeCycleListener} interface
  + * to be notified of persistence broker operations.
    *
  - *
  - * @author <a href="mailto:thma@apache.org">Thomas Mahler<a>
  + * @author Thomas Mahler
    * @version $Id$
    */
   public interface PersistenceBrokerAware
   {
       /**
  -     * this method is called as the first operation before perform an
  -     * object update.
  +     * Is called as the first operation before an object is updated in the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void beforeUpdate(PersistenceBroker broker) throws PersistenceBrokerException;
   
       /**
  -     * this method is called as the last operation within an update
  -     * operation.
  +     * Is called as the last operation after an object was updated in the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performed the persistence operation
        */
       public void afterUpdate(PersistenceBroker broker) throws PersistenceBrokerException;
   
       /**
  -     * this method is called as the first operation before perform an
  -     * object insert.
  +     * Is called as the first operation before an object is inserted into the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void beforeInsert(PersistenceBroker broker) throws PersistenceBrokerException;
   
       /**
  -     * this method is called as the last operation within an insert
  -     * operation.
  +     * Is called as the last operation after an object was inserted into the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void afterInsert(PersistenceBroker broker) throws PersistenceBrokerException;
   
       /**
  -     * this method is called as the first operation within a call to
  -     * PersistenceBroker.delete(...).
  +     * Is called as the first operation before an object is deleted in the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void beforeDelete(PersistenceBroker broker) throws PersistenceBrokerException;
   
  -
       /**
  -     * this method is called as the last operation within a call to
  -     * PersistenceBroker.delete(...).
  +     * Is called as the last operation after an object was deleted in the underlying
  +     * persistence system.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void afterDelete(PersistenceBroker broker) throws PersistenceBrokerException;
   
       /**
  -     * this method is called as the last operation within a call to
  -     * PersistenceBroker.getObjectByXXX() or
  -     * PersistenceBroker.getCollectionByXXX().
  +     * Is called as the last operation after an object was retrieved from the underlying
  +     * persistence system via a call to the <code>getObjectByXXX()</code> or
  +     * <code>getCollectionByXXX()</code>/<code>getIteratorByXXX()</code>
methods in
  +     * {@link PersistenceBroker}.
  +     * 
  +     * @param broker The persistence broker performing the persistence operation
        */
       public void afterLookup(PersistenceBroker broker) throws PersistenceBrokerException;
   }
  
  
  
  1.3.2.2   +12 -2     db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerEvent.java
  
  Index: PersistenceBrokerEvent.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerEvent.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- PersistenceBrokerEvent.java	21 Dec 2005 22:22:07 -0000	1.3.2.1
  +++ PersistenceBrokerEvent.java	22 Dec 2005 21:14:30 -0000	1.3.2.2
  @@ -17,18 +17,28 @@
   
   import org.apache.ojb.broker.util.event.OjbEvent;
   
  +/**
  + * Base class for persistence broker events.
  + */
   public class PersistenceBrokerEvent extends OjbEvent
   {
  +    /**
  +     * Creates a new event instance.
  +     * 
  +     * @param broker The broker
  +     */
       public PersistenceBrokerEvent(PersistenceBroker broker)
       {
           super(broker);
       }
   
       /**
  -     * Convenience method for {@link #getSource}
  +     * Convenience method for {@link #getSource}.
  +     * 
  +     * @return The broker where the event originated
        */
       public PersistenceBroker getTriggeringBroker()
       {
  -        return (PersistenceBroker) getSource();
  +        return (PersistenceBroker)getSource();
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message