User: dsundstrom
  Date: 01/12/03 15:00:17

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc
                        JDBCCommandFactory.java JDBCStoreManager.java
  Added:       src/main/org/jboss/ejb/plugins/cmp/jdbc
                        JDBCIsModifiedCommand.java
  Log:
  Moved isModified call back into persistence manager.  Is modified is still
  checked before store is called.  This is necessary for CMP 2, because the
  bean provider can not know if the bean has been modfied by a relationship.
  
  Revision  Changes    Path
  1.12      +5 -1      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCCommandFactory.java
  
  Index: JDBCCommandFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCCommandFactory.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JDBCCommandFactory.java   2001/11/28 11:32:54     1.11
  +++ JDBCCommandFactory.java   2001/12/03 23:00:16     1.12
  @@ -17,7 +17,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Justin Forder</a>
    * @author <a href="[EMAIL PROTECTED]">danch (Dan Christopherson</a>
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */
   public class JDBCCommandFactory {
      private JDBCStoreManager manager;
  @@ -116,6 +116,10 @@
      
      public JDBCLoadEntityCommand createLoadEntityCommand() {
         return new JDBCLoadEntityCommand(manager);
  +   }
  +   
  +   public JDBCIsModifiedCommand createIsModifiedCommand() {
  +      return new JDBCIsModifiedCommand(manager);
      }
      
      public JDBCStoreEntityCommand createStoreEntityCommand() {
  
  
  
  1.18      +6 -1      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStoreManager.java
  
  Index: JDBCStoreManager.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStoreManager.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JDBCStoreManager.java     2001/12/02 00:05:45     1.17
  +++ JDBCStoreManager.java     2001/12/03 23:00:17     1.18
  @@ -61,7 +61,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
    * @see org.jboss.ejb.EntityPersistenceStore
  - * @version $Revision: 1.17 $
  + * @version $Revision: 1.18 $
    */
   public class JDBCStoreManager implements EntityPersistenceStore {
   
  @@ -97,6 +97,7 @@
      private JDBCCreateEntityCommand createEntityCommand;
      private JDBCRemoveEntityCommand removeEntityCommand;
      private JDBCLoadEntityCommand loadEntityCommand;
  +   private JDBCIsModifiedCommand isModifiedCommand;
      private JDBCStoreEntityCommand storeEntityCommand;
      private JDBCActivateEntityCommand activateEntityCommand;
      private JDBCPassivateEntityCommand passivateEntityCommand;
  @@ -367,6 +368,10 @@
            }
         }
         loadFieldCommand.execute(fieldsToLoad, ctx);
  +   }
  +
  +   public boolean isModified(EntityEnterpriseContext ctx) {
  +      return isModifiedCommand.execute(ctx);
      }
   
      public void storeEntity(EntityEnterpriseContext ctx) {
  
  
  
  1.1                  
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCIsModifiedCommand.java
  
  Index: JDBCIsModifiedCommand.java
  ===================================================================
  /*
   * JBoss, the OpenSource J2EE webOS
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
   
  package org.jboss.ejb.plugins.cmp.jdbc;
  
  import java.lang.reflect.Method;
  import org.jboss.ejb.EntityEnterpriseContext;
  
  /**
   * JDBCIsModifiedCommand determines if the entity has been modified.
   *    
   * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
   * @version $Revision: 1.1 $
   */
   
  public class JDBCIsModifiedCommand {
     public JDBCIsModifiedCommand(JDBCStoreManager manager) {
     }
     
     public boolean execute(EntityEnterpriseContext ctx) {
       return true;
     }
  }
  
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to