297298299300301302303304305306307
+ persistentClass); } ClassDescriptor descriptor = getEntityResolver().getClassDescriptor( entity.getName()); T object = (T) descriptor.createObject(); registerNewObject((Persistent) object, entity.getName(), descriptor); return object; } /**
402403404405406407408409410411412
// hierarchy // this context is. Persistent localObject; localObject = (Persistent) descriptor.createObject(); localObject.setObjectContext(this); localObject.setObjectId(id); getGraphManager().registerNode(id, localObject);
490491492493494495496497498499500
ClassDescriptor descriptor = getEntityResolver().getClassDescriptor( id.getEntityName()); Persistent object; synchronized (graphManager) { object = (Persistent) descriptor.createObject(); object.setPersistenceState(PersistenceState.HOLLOW); object.setObjectContext(this); object.setObjectId(id);
724725726727728729730731732733734
throw new IllegalArgumentException("Invalid entity name: " + entityName); } Persistent object; try { object = (Persistent) descriptor.createObject(); } catch (Exception ex) { throw new CayenneRuntimeException("Error instantiating object.", ex); }
16561657165816591660166116621663166416651666
// create and merge into a new object else { Persistent localObject; localObject = (Persistent) descriptor.createObject(); localObject.setObjectContext(this); localObject.setObjectId(id); getGraphManager().registerNode(id, localObject);
90919293949596979899100
// presumably id's entity name should be of the right subclass. final ClassDescriptor targetDescriptor = targetResolver.getClassDescriptor(id .getEntityName()); final Persistent target = (Persistent) targetDescriptor.createObject(); target.setObjectId(id); seen.put(id, target); descriptor.visitProperties(new PropertyVisitor() {
540541542543544545546547548549550
12101211121212131214121512161217121812191220
253254255256257258259260261262263
356357358359360361362363364365366