From 429b647aa5b19d5d25c0fbe013baf9cb16f30d5c Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 1 Aug 2001 00:01:44 +0000 Subject: [PATCH] all HopObjects are now instantiated directly with the persistent capable class, i.e. helma.objectmodel.db.Server. --- src/helma/framework/core/NodeConstructor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/helma/framework/core/NodeConstructor.java b/src/helma/framework/core/NodeConstructor.java index 5223a804..a02f8a5d 100644 --- a/src/helma/framework/core/NodeConstructor.java +++ b/src/helma/framework/core/NodeConstructor.java @@ -3,6 +3,7 @@ package helma.framework.core; +import helma.objectmodel.db.Node; import FESI.Data.*; import FESI.Exceptions.*; import FESI.Interpreter.*; @@ -31,10 +32,12 @@ public class NodeConstructor extends BuiltinFunctionObject { ESNode node = null; if ("Node".equals (typename) || "hopobject".equalsIgnoreCase (typename)) { if (arguments.length == 0) { - node = new ESNode (reval.esNodePrototype, this.evaluator, null, reval); + Node n = new Node ((String) null, (String) null, reval.app.nmgr.safe); + node = new ESNode (reval.esNodePrototype, this.evaluator, n, reval); reval.objectcache.put (node.getNode (), node); } else { - node = new ESNode (reval.esNodePrototype, this.evaluator, arguments[0], reval); + Node n = new Node (arguments[0].toString(), (String) null, reval.app.nmgr.safe); + node = new ESNode (reval.esNodePrototype, this.evaluator, n, reval); reval.objectcache.put (node.getNode (), node); } } else { @@ -43,7 +46,8 @@ public class NodeConstructor extends BuiltinFunctionObject { // is that we want to be able to use the specail features like subnode relations even for // transient nodes. ObjectPrototype op = reval.getPrototype (typename); - node = new ESNode (op, reval.evaluator, typename, reval); + Node n = new Node (typename, typename, reval.app.nmgr.safe); + node = new ESNode (op, reval.evaluator, n, reval); node.setPrototype (typename); node.getNode ().setDbMapping (reval.app.getDbMapping (typename)); try {