1 package org.kuali.ole.batch.bo;
2
3 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
4
5
6
7
8
9
10
11
12 public class OLEBatchProcessProfileDataMappingOptionsBo extends PersistableBusinessObjectBase implements Comparable<OLEBatchProcessProfileDataMappingOptionsBo>{
13
14 private String oleBatchProcessProfileDataMappingOptionId;
15 private String oleBatchProcessDataMapId;
16 private String fileType;
17 private String dataType;
18 private String dataTypeDestinationField;
19 private String sourceField;
20 private String sourceFieldText;
21 private String sourceFieldValue;
22 private String destinationField;
23 private String destinationFieldText;
24 private String destinationFieldValue;
25 private String gokbField;
26 private int priority;
27 private boolean lookUp;
28 private OLEBatchProcessProfileMappingOptionsBo oleBatchProcessProfileMappingOptionsBo;
29 public String getDataType() {
30 return dataType;
31 }
32
33 public void setDataType(String dataType) {
34 this.dataType = dataType;
35 }
36 public String getOleBatchProcessDataMapId() {
37 return oleBatchProcessDataMapId;
38 }
39
40 public void setOleBatchProcessDataMapId(String oleBatchProcessDataMapId) {
41 this.oleBatchProcessDataMapId = oleBatchProcessDataMapId;
42 }
43
44 public String getOleBatchProcessProfileDataMappingOptionId() {
45 return oleBatchProcessProfileDataMappingOptionId;
46 }
47
48 public void setOleBatchProcessProfileDataMappingOptionId(String oleBatchProcessProfileDataMappingOptionId) {
49 this.oleBatchProcessProfileDataMappingOptionId = oleBatchProcessProfileDataMappingOptionId;
50 }
51
52 public OLEBatchProcessProfileMappingOptionsBo getOleBatchProcessProfileMappingOptionsBo() {
53 return oleBatchProcessProfileMappingOptionsBo;
54 }
55
56 public void setOleBatchProcessProfileMappingOptionsBo(OLEBatchProcessProfileMappingOptionsBo oleBatchProcessProfileMappingOptionsBo) {
57 this.oleBatchProcessProfileMappingOptionsBo = oleBatchProcessProfileMappingOptionsBo;
58 }
59
60 public String getFileType() {
61 return fileType;
62 }
63
64 public void setFileType(String fileType) {
65 this.fileType = fileType;
66 }
67
68 public String getSourceField() {
69 if(sourceField==null || sourceField.isEmpty())
70 {
71 if(sourceFieldText!=null && !sourceFieldText.isEmpty()){
72 return sourceFieldText;
73 }
74 }
75 return sourceField;
76 }
77
78 public void setSourceField(String sourceField) {
79 this.sourceField = sourceField;
80 }
81
82 public String getSourceFieldValue() {
83 return sourceFieldValue;
84 }
85
86 public void setSourceFieldValue(String sourceFieldValue) {
87 this.sourceFieldValue = sourceFieldValue;
88 }
89
90 public String getDestinationField() {
91 if(destinationField==null || destinationField.isEmpty())
92 {
93 if(destinationFieldText!=null && !destinationFieldText.isEmpty()){
94 return destinationFieldText;
95 }
96 }
97 return destinationField;
98 }
99
100 public void setDestinationField(String destinationField) {
101 this.destinationField = destinationField;
102 }
103
104 public String getDestinationFieldValue() {
105 return destinationFieldValue;
106 }
107
108 public void setDestinationFieldValue(String destinationFieldValue) {
109 this.destinationFieldValue = destinationFieldValue;
110 }
111
112 public int getPriority() {
113 return priority;
114 }
115
116 public void setPriority(int priority) {
117 this.priority = priority;
118 }
119
120 public boolean isLookUp() {
121 return lookUp;
122 }
123
124 public void setLookUp(boolean lookUp) {
125 this.lookUp = lookUp;
126 }
127
128 public String getSourceFieldText() {
129 return sourceFieldText;
130 }
131
132 public void setSourceFieldText(String sourceFieldText) {
133 this.sourceFieldText = sourceFieldText;
134
135 if(sourceField==null || sourceField.isEmpty())
136 {
137 if(sourceFieldText!=null && !sourceFieldText.isEmpty()){
138 this.sourceField= sourceFieldText;
139 }
140 }
141 }
142
143 public String getDestinationFieldText() {
144 return destinationFieldText;
145 }
146
147 public void setDestinationFieldText(String destinationFieldText) {
148 this.destinationFieldText = destinationFieldText;
149
150 if(destinationField==null || destinationField.isEmpty())
151 {
152 if(destinationFieldText!=null && !destinationFieldText.isEmpty()){
153 this.destinationField= destinationFieldText;
154 }
155 }
156 }
157
158 public String getDataTypeDestinationField() {
159 return dataTypeDestinationField;
160 }
161
162 public void setDataTypeDestinationField(String dataTypeDestinationField) {
163 this.dataTypeDestinationField = dataTypeDestinationField;
164 }
165
166 public String getGokbField() {
167 return gokbField;
168 }
169
170 public void setGokbField(String gokbField) {
171 this.gokbField = gokbField;
172 }
173
174 @Override
175 public int compareTo(OLEBatchProcessProfileDataMappingOptionsBo o) {
176
177 if(this.getDataTypeDestinationField().equals(o.getDataTypeDestinationField())) {
178 if(this.getDestinationField().equals(o.getDestinationField())) {
179 return this.getPriority() - o.getPriority();
180 }
181 else {
182 return this.getDestinationField().compareTo(o.getDestinationField());
183 }
184 }
185 else {
186 return this.getDataTypeDestinationField().compareTo(o.getDataTypeDestinationField());
187 }
188
189 }
190 }