1 21 package oracle.toplink.essentials.internal.sessions; 23 24 import oracle.toplink.essentials.mappings.*; 25 import oracle.toplink.essentials.internal.sessions.AbstractSession; 26 import java.io.Serializable ; 27 28 36 public abstract class ChangeRecord implements Serializable , oracle.toplink.essentials.changesets.ChangeRecord { 37 38 41 protected String attribute; 42 43 46 protected transient DatabaseMapping mapping; 47 48 49 protected ObjectChangeSet owner; 50 51 56 public String getAttribute() { 57 return attribute; 58 } 59 60 64 public DatabaseMapping getMapping() { 65 return mapping; 66 } 67 68 73 public oracle.toplink.essentials.changesets.ObjectChangeSet getOwner() { 74 return (oracle.toplink.essentials.changesets.ObjectChangeSet)owner; 75 } 76 77 81 public abstract void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet); 82 83 89 public void prepareForSynchronization(AbstractSession session) { 90 } 91 92 96 public void setAttribute(String newValue) { 97 this.attribute = newValue; 98 } 99 100 103 public void setMapping(DatabaseMapping mapping) { 104 this.mapping = mapping; 105 } 106 107 112 public void setOwner(ObjectChangeSet newOwner) { 113 owner = newOwner; 114 } 115 116 public String toString() { 117 return this.getClass().getName() + "(" + getAttribute() + ")"; 118 } 119 120 124 public void updateChangeRecordWithNewValue(Object newValue) { 125 } 127 128 132 public abstract void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet); 133 } 134 | Popular Tags |