146147148149150151152153154155156
} if("b".equals(distinguisher)) { return new ByteIdentity(objectTypeClassFor(oid), keyStr); } if("u".equals(distinguisher)) { return new ObjectIdentity(objectTypeClassFor(oid), UUID.fromString(keyStr)); } } if(dnPrefixes.contains(distinguisher)) {
99100101102103104105106107108109110111112
c.setName("Child 1"); p.addChild(c); beginTxn(); oldPM.makePersistent(p); commitTxn(); ObjectIdentity pId = (ObjectIdentity)oldPM.getObjectId(p); ObjectIdentity cId = (ObjectIdentity)oldPM.getObjectId(c); Key pIdKey = (Key)pId.getKey(); Key cIdKey = (Key)cId.getKey(); oldPM.close(); // Migrate the data Migrator migrator = new Migrator(((JDOPersistenceManagerFactory)oldPMF).getNucleusContext()); try {