Cleaned up constructor a bit, use direct assignment instead of setter for prototype.

This commit is contained in:
hns 2005-06-16 17:51:04 +00:00
parent 27a31bd736
commit 0c8b653c1e

View file

@ -111,16 +111,13 @@ public final class Node implements INode, Serializable {
public Node(Node home, String propname, WrappedNodeManager nmgr, String prototype) { public Node(Node home, String propname, WrappedNodeManager nmgr, String prototype) {
this.nmgr = nmgr; this.nmgr = nmgr;
setParent(home); setParent(home);
// this.dbmap = null;
// generate a key for the virtual node that can't be mistaken for a Database Key // generate a key for the virtual node that can't be mistaken for a Database Key
primaryKey = new SyntheticKey(home.getKey(), propname); primaryKey = new SyntheticKey(home.getKey(), propname);
this.id = primaryKey.getID(); this.id = primaryKey.getID();
this.name = propname; this.name = propname;
this.prototype = prototype;
this.anonymous = false; this.anonymous = false;
setPrototype(prototype);
// set the collection's state according to the home node's state // set the collection's state according to the home node's state
if (home.state == NEW || home.state == TRANSIENT) { if (home.state == NEW || home.state == TRANSIENT) {
this.state = TRANSIENT; this.state = TRANSIENT;