1 4 package com.tc.object.change.event; 5 6 import com.tc.object.ObjectID; 7 import com.tc.object.change.TCChangeBufferEvent; 8 import com.tc.object.dna.api.DNAWriter; 9 10 public class PhysicalChangeEvent implements TCChangeBufferEvent { 11 private final Object newValue; 12 private final String fieldname; 13 14 public PhysicalChangeEvent(String fieldname, Object newValue) { 15 this.newValue = newValue; 16 this.fieldname = fieldname; 17 } 18 19 public String getFieldName() { 20 return fieldname; 21 } 22 23 public Object getNewValue() { 24 return newValue; 25 } 26 27 public boolean isReference() { 28 return newValue instanceof ObjectID; 29 } 30 31 public void write(DNAWriter writer) { 32 writer.addPhysicalAction(fieldname, newValue); 33 } 34 35 } | Popular Tags |