1 16 package net.sf.dozer.util.mapping.event; 17 18 import net.sf.dozer.util.mapping.fieldmap.ClassMap; 19 import net.sf.dozer.util.mapping.fieldmap.FieldMap; 20 21 25 public class DozerEvent { 26 27 private String type; 28 29 private ClassMap classMap; 30 31 private FieldMap fieldMap; 32 33 private Object sourceObject; 34 35 private Object destinationObject; 36 37 private Object destinationValue; 38 39 public DozerEvent(String type, ClassMap classMap, FieldMap fieldMap, Object sourceObject, Object destinationObject, 40 Object destinationValue) { 41 this.type = type; 42 this.classMap = classMap; 43 this.fieldMap = fieldMap; 44 this.sourceObject = sourceObject; 45 this.destinationObject = destinationObject; 46 this.destinationValue = destinationValue; 47 } 48 49 public String getType() { 50 return type; 51 } 52 53 public void setType(String type) { 54 this.type = type; 55 } 56 57 public ClassMap getClassMap() { 58 return classMap; 59 } 60 61 public void setClassMap(ClassMap classMap) { 62 this.classMap = classMap; 63 } 64 65 public Object getDestinationObject() { 66 return destinationObject; 67 } 68 69 public void setDestinationObject(Object destinationObject) { 70 this.destinationObject = destinationObject; 71 } 72 73 public Object getDestinationValue() { 74 return destinationValue; 75 } 76 77 public void setDestinationValue(Object destinationValue) { 78 this.destinationValue = destinationValue; 79 } 80 81 public FieldMap getFieldMap() { 82 return fieldMap; 83 } 84 85 public void setFieldMap(FieldMap fieldMap) { 86 this.fieldMap = fieldMap; 87 } 88 89 public Object getSourceObject() { 90 return sourceObject; 91 } 92 93 public void setSourceObject(Object sourceObject) { 94 this.sourceObject = sourceObject; 95 } 96 97 public String toString() { 98 StringBuffer sb = new StringBuffer (); 99 if (getClassMap() != null) { 100 sb.append("Type:" + type + "\n"); 101 } 102 if (getClassMap() != null) { 103 sb.append("ClassMap:" + getClassMap().toString() + "\n"); 104 } 105 if (getFieldMap() != null) { 106 sb.append("FieldMap:" + getFieldMap().toString() + "\n"); 107 } 108 if (getSourceObject() != null) { 109 sb.append("SourceObject:" + getSourceObject().toString() + "\n"); 110 } 111 if (getDestinationObject() != null) { 112 sb.append("DestinationObject:" + getDestinationObject().toString() + "\n"); 113 } 114 if (getDestinationValue() != null) { 115 sb.append("DestinationValue:" + getDestinationValue().toString() + "\n"); 116 } 117 return sb.toString(); 118 } 119 } | Popular Tags |