1 package org.kuali.mobility.util.mapper.entity;
2
3 import java.io.Serializable;
4
5 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
6
7 public class MappingElement implements Serializable
8 {
9
10 private static final long serialVersionUID = -7978581905560378671L;
11
12 @XStreamAsAttribute
13 private String mapTo;
14 @XStreamAsAttribute
15 private String mapFrom;
16 @XStreamAsAttribute
17 private boolean list;
18 @XStreamAsAttribute
19 private String type;
20 @XStreamAsAttribute
21 private boolean isAttribute;
22
23
24
25
26 public boolean isList() {
27 return list;
28 }
29
30
31
32
33 public void setList(final boolean list) {
34 this.list = list;
35 }
36
37
38
39
40 public String getType() {
41 return type == null ? "java.lang.String" : type;
42 }
43
44
45
46
47 public void setType(final String type) {
48 this.type = type;
49 }
50
51 public String getMapTo() {
52 return mapTo;
53 }
54
55 public void setMapTo(String mapTo) {
56 this.mapTo = mapTo;
57 }
58
59 public String getMapFrom() {
60 return (mapFrom == null || mapFrom.isEmpty() ? getMapTo() : mapFrom);
61 }
62
63 public void setMapFrom(String mapFrom) {
64 this.mapFrom = mapFrom;
65 }
66
67 public boolean isAttribute() {
68 return isAttribute;
69 }
70
71 public void setAttribute(boolean isAttribute) {
72 this.isAttribute = isAttribute;
73 }
74 }