01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.appevent;
06:
07: import com.tc.util.NonPortableReason;
08:
09: /**
10: * The event context for a set of a non-portable field event.
11: */
12: public class NonPortableFieldSetContext extends NonPortableEventContext {
13:
14: private static final long serialVersionUID = -556002400100752262L;
15:
16: private final String fieldName;
17: private transient final Object fieldValue;
18:
19: public static final String FIELD_NAME_LABEL = "Non-portable field name";
20:
21: public NonPortableFieldSetContext(String threadName,
22: String clientId, Object pojo, String fieldName,
23: Object fieldValue) {
24: super (pojo, threadName, clientId);
25: this .fieldName = fieldName;
26: this .fieldValue = fieldValue;
27: }
28:
29: /**
30: * @return The field name being set
31: */
32: public String getFieldName() {
33: return fieldName;
34: }
35:
36: /**
37: * @return The field value being set
38: */
39: public Object getFieldValue() {
40: return fieldValue;
41: }
42:
43: public void addDetailsTo(NonPortableReason reason) {
44: super.addDetailsTo(reason);
45: reason.addDetail(FIELD_NAME_LABEL, fieldName);
46: }
47:
48: }
|