You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/09/01 18:28:47 UTC

cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/om Persistent.java

dlr         01/09/01 09:28:47

  Modified:    src/java/org/apache/torque/om Persistent.java
  Log:
  Forward-porting Fedor's change.  Torque-generated OM classes implement
  this interface, and BaseObject is abstract (so doesn't have to).
  
  Revision  Changes    Path
  1.3       +18 -1     jakarta-turbine-torque/src/java/org/apache/torque/om/Persistent.java
  
  Index: Persistent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/om/Persistent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- Persistent.java	2001/08/10 12:23:03	1.2
  +++ Persistent.java	2001/09/01 16:28:47	1.3
  @@ -54,12 +54,14 @@
    * <http://www.apache.org/>.
    */
   
  +import org.apache.torque.pool.DBConnection;
   
   /**
    * This interface defines methods related to saving an object
    *
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
  - * @version $Id: Persistent.java,v 1.2 2001/08/10 12:23:03 knielsen Exp $
  + * @author <a href="mailto:fedor@apache.org">Fedor K.</a>
  + * @version $Id: Persistent.java,v 1.3 2001/09/01 16:28:47 dlr Exp $
    */
   public interface Persistent
   {
  @@ -122,4 +124,19 @@
        * Saves the object.
        */
       public void save() throws Exception;
  +
  +    /**
  +     * Stores the object in the database.  If the object is new,
  +     * it inserts it; otherwise an update is performed.
  +     */
  +    public void save(String dbName) throws Exception;
  +
  +    /**
  +     * Stores the object in the database.  If the object is new,
  +     * it inserts it; otherwise an update is performed.  This method
  +     * is meant to be used as part of a transaction, otherwise use
  +     * the save() method and the connection details will be handled
  +     * internally
  +     */
  +    public void save(DBConnection dbCon) throws Exception;
   }
  
  
  

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