+ if (unrefed.size()>0) {
+ sync=false; // document is out of sync - ids have been created.
+ java.util.Iterator newobj = unrefed.listIterator();
+ while (newobj.hasNext()) {
+ object o = (object) newobj.next();
+ // forces registration and id field update.
+ VorbaId id = o.getVorbaId();
+ if (!objrefs.containsKey(id)) {
+ objrefs.put(id.id, o);
+ } else {
+ throw new Error("Serious! Duplicate reference made by vorbaIdFactory!");
+ }
+ }
+ }
+ return new Object[] { obj, objrefs, new Boolean(sync)};