deferred object related changes BLD200310060100
authordprusa@netbeans.org
Thu, 02 Oct 2003 19:49:38 +0000
changeset 13538067aabd950f
parent 1352 ab373df7aef6
child 1354 0722916dc776
deferred object related changes
mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java
     1.1 --- a/mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java	Wed Oct 01 15:58:49 2003 +0000
     1.2 +++ b/mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java	Thu Oct 02 19:49:38 2003 +0000
     1.3 @@ -154,7 +154,6 @@
     1.4              return null;
     1.5          }
     1.6  
     1.7 -        // [PENDING]
     1.8          Object lock = s.getMdrStorage().getStorageByMofId(s.getMofId());
     1.9          if (lock == null)
    1.10              lock = facilityCache;
    1.11 @@ -210,16 +209,16 @@
    1.12              else if (cls.equals (TransientStorableAssociation.class)) {
    1.13                  cls = StorableAssociation.class;
    1.14              }
    1.15 -            else if (cls.getName ().equals ("org.netbeans.modules.classmodel.jmiimpl.physical.DeferredObject")) {
    1.16 -                cls = StorableObject.class; // [PENDING]
    1.17 +            else if ((cls != StorableObject.class) && (StorableObject.class.isAssignableFrom(cls))) {
    1.18 +                cls = StorableObject.class;
    1.19              }
    1.20              /* create handler object, if necessary */
    1.21              Constructor cons = cl.getConstructor(new Class[] {cls});
    1.22 -            
    1.23 -            // [PENDING]
    1.24 +                      
    1.25              Object lock = s.getMdrStorage().getStorageByMofId(s.getMofId());
    1.26              if (lock == null)
    1.27                  lock = facilityCache;
    1.28 +            
    1.29              synchronized (lock) {
    1.30  //                synchronized (facilityCache) {
    1.31                      Object oldRecord = facilityCache.get(s.getMofId());
    1.32 @@ -310,15 +309,9 @@
    1.33          //this.storableDelegate = storable;
    1.34          this.mdrStorage = storable.getMdrStorage();
    1.35          try {
    1.36 -            // [PENDING]
    1.37 -            /*
    1.38 -            if (storable instanceof StorableObject && ((StorableObject)storable).getClassProxy ().isTransient ()) {
    1.39 -                this.storable = storable;
    1.40 -            }
    1.41 -             */
    1.42              if (storable instanceof StorableObject && 
    1.43                  (((StorableObject)storable).getClassProxy ().isTransient ()) || 
    1.44 -                (storable.getClass().getName().equals("org.netbeans.modules.classmodel.jmiimpl.physical.DeferredObject"))
    1.45 +                (storable.getClass().getName().equals("org.netbeans.modules.classmodel.jmiimpl.physical.DeferredObject")) // [PENDING]
    1.46                  ) {
    1.47                  this.storable = storable;
    1.48              }