01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.change.event;
05:
06: import com.tc.object.ObjectID;
07: import com.tc.object.change.TCChangeBufferEvent;
08: import com.tc.object.dna.api.DNAWriter;
09:
10: public class LiteralChangeEvent implements TCChangeBufferEvent {
11: private final Object newValue;
12:
13: public LiteralChangeEvent(Object newValue) {
14: this .newValue = newValue;
15: }
16:
17: public Object getNewValue() {
18: return newValue;
19: }
20:
21: public boolean isReference() {
22: return newValue instanceof ObjectID;
23: }
24:
25: public void write(DNAWriter writer) {
26: writer.addLiteralValue(newValue);
27: }
28:
29: }
|