1 21 package oracle.toplink.essentials.internal.sessions; 23 24 29 public class ObjectReferenceChangeRecord extends ChangeRecord implements oracle.toplink.essentials.changesets.ObjectReferenceChangeRecord { 30 31 32 protected ObjectChangeSet newValue; 33 34 35 protected transient Object oldValue; 36 37 41 public ObjectReferenceChangeRecord() { 42 super(); 43 } 44 45 50 public ObjectReferenceChangeRecord(ObjectChangeSet owner) { 51 this.owner = owner; 52 } 53 54 59 public oracle.toplink.essentials.changesets.ObjectChangeSet getNewValue() { 60 return newValue; 61 } 62 63 67 public void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) { 68 ObjectChangeSet localChangeSet = mergeToChangeSet.findOrIntegrateObjectChangeSet((ObjectChangeSet)((ObjectReferenceChangeRecord)mergeFromRecord).getNewValue(), mergeFromChangeSet); 69 this.newValue = localChangeSet; 70 } 71 72 73 77 public void setNewValue(oracle.toplink.essentials.changesets.ObjectChangeSet newValue) { 78 this.newValue = (ObjectChangeSet)newValue; 79 } 80 81 85 public void setNewValue(ObjectChangeSet newValue) { 86 this.newValue = newValue; 87 } 88 89 93 public Object getOldValue() { 94 return oldValue; 95 } 96 97 101 public void setOldValue(Object oldValue) { 102 this.oldValue = oldValue; 103 } 104 105 109 public void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet) { 110 this.setNewValue(mergeToChangeSet.findOrIntegrateObjectChangeSet((ObjectChangeSet)this.getNewValue(), mergeFromChangeSet)); 111 } 112 } 113 | Popular Tags |