1 18 19 package sync4j.framework.engine; 20 21 import sync4j.framework.engine.SyncItem; 22 import sync4j.framework.engine.SyncItemKey; 23 24 import org.apache.commons.lang.builder.ToStringBuilder; 25 26 27 42 public class SyncItemMapping { 43 45 48 private SyncItemKey key = null; 49 50 52 58 public SyncItemMapping(Object key) { 59 if (key instanceof SyncItemKey) { 60 this.key = (SyncItemKey)key; 61 } else { 62 this.key = new SyncItemKey(key); 63 } 64 } 65 66 67 69 public SyncItemKey getKey() { 70 return this.key; 71 } 72 73 public void setMapping(SyncItem syncItemA, SyncItem syncItemB) { 74 this.syncItemA = syncItemA; 75 this.syncItemB = syncItemB; 76 } 77 78 81 public String toString() { 82 return new ToStringBuilder(this). 83 append("key" , key.toString() ). 84 append("syncItemA", syncItemA ). 85 append("syncItemB", syncItemB ). 86 toString(); 87 } 88 89 91 94 private SyncItem syncItemA = null; 95 96 100 public SyncItem getSyncItemA() { 101 return syncItemA; 102 } 103 104 108 public void setSyncItemA(SyncItem syncItemA) { 109 this.syncItemA = syncItemA; 110 } 111 112 115 private SyncItem syncItemB = null; 116 117 121 public SyncItem getSyncItemB() { 122 return syncItemB; 123 } 124 125 129 public void setSyncItemB(SyncItem syncItemB) { 130 this.syncItemB = syncItemB; 131 } 132 } | Popular Tags |