added new constructor to build from class hints
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 23 Oct 2007 15:36:45 +0000 (15:36 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 23 Oct 2007 15:36:45 +0000 (15:36 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1112 9efc2488-bf62-4759-914b-345cdb29e865

src/java/org/opensrf/util/OSRFObject.java

index 1050706..af28f4a 100644 (file)
@@ -16,6 +16,7 @@ public class OSRFObject extends HashMap<String, Object> implements OSRFSerializa
     public OSRFObject() {
     }
 
+
     /**
      * Creates a new object with the provided registry
      */
@@ -24,6 +25,15 @@ public class OSRFObject extends HashMap<String, Object> implements OSRFSerializa
         registry = reg;
     }
 
+
+    /**
+     * Creates a new OpenSRF object based on the net class string
+     * */
+    public OSRFObject(String netClass) {
+        this(OSRFRegistry.getRegistry(netClass));
+    }
+
+
     /**
      * @return This object's registry
      */