| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.dozer.event; |
| 17 | |
|
| 18 | |
import org.dozer.classmap.ClassMap; |
| 19 | |
import org.dozer.fieldmap.FieldMap; |
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
public class DozerEvent { |
| 28 | |
|
| 29 | |
private DozerEventType type; |
| 30 | |
private ClassMap classMap; |
| 31 | |
private FieldMap fieldMap; |
| 32 | |
private Object sourceObject; |
| 33 | |
private Object destinationObject; |
| 34 | |
private Object destinationValue; |
| 35 | |
|
| 36 | |
|
| 37 | |
public DozerEvent(DozerEventType type, ClassMap classMap, FieldMap fieldMap, Object sourceObject, Object destinationObject, |
| 38 | 624100 | Object destinationValue) { |
| 39 | 624100 | this.type = type; |
| 40 | 624100 | this.classMap = classMap; |
| 41 | 624100 | this.fieldMap = fieldMap; |
| 42 | 624100 | this.sourceObject = sourceObject; |
| 43 | 624100 | this.destinationObject = destinationObject; |
| 44 | 624100 | this.destinationValue = destinationValue; |
| 45 | 624100 | } |
| 46 | |
|
| 47 | |
public DozerEventType getType() { |
| 48 | 624099 | return type; |
| 49 | |
} |
| 50 | |
|
| 51 | |
public ClassMap getClassMap() { |
| 52 | 3 | return classMap; |
| 53 | |
} |
| 54 | |
|
| 55 | |
public Object getDestinationObject() { |
| 56 | 2 | return destinationObject; |
| 57 | |
} |
| 58 | |
|
| 59 | |
public Object getDestinationValue() { |
| 60 | 2 | return destinationValue; |
| 61 | |
} |
| 62 | |
|
| 63 | |
public FieldMap getFieldMap() { |
| 64 | 2 | return fieldMap; |
| 65 | |
} |
| 66 | |
|
| 67 | |
public Object getSourceObject() { |
| 68 | 2 | return sourceObject; |
| 69 | |
} |
| 70 | |
|
| 71 | |
@Override |
| 72 | |
public String toString() { |
| 73 | 1 | StringBuffer sb = new StringBuffer(); |
| 74 | 1 | if (getClassMap() != null) { |
| 75 | 1 | sb.append("Type:").append(type).append("\n"); |
| 76 | |
} |
| 77 | 1 | if (getClassMap() != null) { |
| 78 | 1 | sb.append("ClassMap:").append(getClassMap().toString()).append("\n"); |
| 79 | |
} |
| 80 | 1 | if (getFieldMap() != null) { |
| 81 | 1 | sb.append("FieldMap:").append(getFieldMap().toString()).append("\n"); |
| 82 | |
} |
| 83 | 1 | if (getSourceObject() != null) { |
| 84 | 1 | sb.append("SourceObject:").append(getSourceObject().toString()).append("\n"); |
| 85 | |
} |
| 86 | 1 | if (getDestinationObject() != null) { |
| 87 | 1 | sb.append("DestinationObject:").append(getDestinationObject().toString()).append("\n"); |
| 88 | |
} |
| 89 | 1 | if (getDestinationValue() != null) { |
| 90 | 1 | sb.append("DestinationValue:").append(getDestinationValue().toString()).append("\n"); |
| 91 | |
} |
| 92 | 1 | return sb.toString(); |
| 93 | |
} |
| 94 | |
} |