-
Notifications
You must be signed in to change notification settings - Fork 5
/
Mapping.java
436 lines (327 loc) · 9.04 KB
/
Mapping.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
package org.openconceptlab.fhir.model;
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;
import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;
/**
* The persistent class for the mappings database table.
* @author harpatel1
*/
@Entity
@Table(name="mappings")
@TypeDefs({
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
})
public class Mapping extends BaseOclEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
@Column
private String comment;
@Column(name="created_at")
private Timestamp createdAt;
@Column(name="custom_validation_schema")
private String customValidationSchema;
@Column(name="external_id")
private String externalId;
@Type(type = "jsonb")
@Column(columnDefinition = "jsonb")
private String extras;
@Column(name="internal_reference_id")
private String internalReferenceId;
@Column(name="is_active")
private Boolean isActive;
@Column(name="is_latest_version")
private Boolean isLatestVersion;
@Column(name="map_type")
private String mapType;
@Column(name="public_access")
private String publicAccess;
@Column
private Boolean released;
@Column
private Boolean retired;
@Column(name="to_concept_code")
private String toConceptCode;
@Column(name="from_concept_code")
private String fromConceptCode;
@Column(name="to_concept_name")
private String toConceptName;
@Column(name="from_concept_name")
private String fromConceptName;
@Column(name="updated_at")
private Timestamp updatedAt;
@Column
private String uri;
@Column
private String version;
@OneToMany(mappedBy="mapping", fetch = FetchType.LAZY)
private List<CollectionsMapping> collectionsMappings;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="from_concept_id")
private Concept fromConcept;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="to_concept_id")
private Concept toConcept;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="versioned_object_id")
private Mapping versionedObject;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="parent_id")
private Source parent;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="to_source_id")
private Source toSource;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="from_source_id")
private Source fromSource;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="created_by_id")
private UserProfile createdBy;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="updated_by_id")
private UserProfile updatedBy;
// @OneToMany(mappedBy="mapping", fetch = FetchType.LAZY)
// private List<MappingsSource> mappingsSources;
@Column(name = "from_source_url")
private String fromSourceUrl;
@Column(name = "to_source_url")
private String toSourceUrl;
@Column(name = "from_source_version")
private String fromSourceVersion;
@Column(name = "to_source_version")
private String toSourceVersion;
public Mapping() {
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getComment() {
return this.comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Timestamp getCreatedAt() {
return this.createdAt;
}
public void setCreatedAt(Timestamp createdAt) {
this.createdAt = createdAt;
}
public String getCustomValidationSchema() {
return this.customValidationSchema;
}
public void setCustomValidationSchema(String customValidationSchema) {
this.customValidationSchema = customValidationSchema;
}
public String getExternalId() {
return this.externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public String getExtras() {
return this.extras;
}
public void setExtras(String extras) {
this.extras = extras;
}
public String getInternalReferenceId() {
return this.internalReferenceId;
}
public void setInternalReferenceId(String internalReferenceId) {
this.internalReferenceId = internalReferenceId;
}
public Boolean getIsActive() {
return this.isActive;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
public Boolean getIsLatestVersion() {
return this.isLatestVersion;
}
public void setIsLatestVersion(Boolean isLatestVersion) {
this.isLatestVersion = isLatestVersion;
}
public String getMapType() {
return this.mapType;
}
public void setMapType(String mapType) {
this.mapType = mapType;
}
public String getPublicAccess() {
return this.publicAccess;
}
public void setPublicAccess(String publicAccess) {
this.publicAccess = publicAccess;
}
public Boolean getReleased() {
return this.released;
}
public void setReleased(Boolean released) {
this.released = released;
}
public Boolean getRetired() {
return this.retired;
}
public void setRetired(Boolean retired) {
this.retired = retired;
}
public String getToConceptCode() {
return this.toConceptCode;
}
public void setToConceptCode(String toConceptCode) {
this.toConceptCode = toConceptCode;
}
public String getToConceptName() {
return this.toConceptName;
}
public void setToConceptName(String toConceptName) {
this.toConceptName = toConceptName;
}
public Timestamp getUpdatedAt() {
return this.updatedAt;
}
public void setUpdatedAt(Timestamp updatedAt) {
this.updatedAt = updatedAt;
}
public String getUri() {
return this.uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String getVersion() {
return this.version;
}
public void setVersion(String version) {
this.version = version;
}
public List<CollectionsMapping> getCollectionsMappings() {
return this.collectionsMappings;
}
public void setCollectionsMappings(List<CollectionsMapping> collectionsMappings) {
this.collectionsMappings = collectionsMappings;
}
public CollectionsMapping addCollectionsMapping(CollectionsMapping collectionsMapping) {
getCollectionsMappings().add(collectionsMapping);
collectionsMapping.setMapping(this);
return collectionsMapping;
}
public CollectionsMapping removeCollectionsMapping(CollectionsMapping collectionsMapping) {
getCollectionsMappings().remove(collectionsMapping);
collectionsMapping.setMapping(null);
return collectionsMapping;
}
public Concept getFromConcept() {
return this.fromConcept;
}
public void setFromConcept(Concept concept1) {
this.fromConcept = concept1;
}
public Concept getToConcept() {
return this.toConcept;
}
public void setToConcept(Concept concept2) {
this.toConcept = concept2;
}
public Mapping getVersionedObject() {
return this.versionedObject;
}
public void setVersionedObject(Mapping mapping) {
this.versionedObject = mapping;
}
public Source getParent() {
return this.parent;
}
public void setParent(Source source1) {
this.parent = source1;
}
public Source getToSource() {
return this.toSource;
}
public void setToSource(Source source2) {
this.toSource = source2;
}
public UserProfile getCreatedBy() {
return this.createdBy;
}
public void setCreatedBy(UserProfile userProfile1) {
this.createdBy = userProfile1;
}
public UserProfile getUpdatedBy() {
return this.updatedBy;
}
public void setUpdatedBy(UserProfile userProfile2) {
this.updatedBy = userProfile2;
}
// public List<MappingsSource> getMappingsSources() {
// return this.mappingsSources;
// }
//
// public void setMappingsSources(List<MappingsSource> mappingsSources) {
// this.mappingsSources = mappingsSources;
// }
// public MappingsSource addMappingsSource(MappingsSource mappingsSource) {
// getMappingsSources().add(mappingsSource);
// mappingsSource.setMapping(this);
// return mappingsSource;
// }
//
// public MappingsSource removeMappingsSource(MappingsSource mappingsSource) {
// getMappingsSources().remove(mappingsSource);
// mappingsSource.setMapping(null);
// return mappingsSource;
// }
public String getFromConceptCode() {
return fromConceptCode;
}
public void setFromConceptCode(String fromConceptCode) {
this.fromConceptCode = fromConceptCode;
}
public String getFromConceptName() {
return fromConceptName;
}
public void setFromConceptName(String fromConceptName) {
this.fromConceptName = fromConceptName;
}
public String getFromSourceUrl() {
return fromSourceUrl;
}
public void setFromSourceUrl(String fromSourceUrl) {
this.fromSourceUrl = fromSourceUrl;
}
public String getToSourceUrl() {
return toSourceUrl;
}
public void setToSourceUrl(String toSourceUrl) {
this.toSourceUrl = toSourceUrl;
}
public Source getFromSource() {
return fromSource;
}
public void setFromSource(Source fromSource) {
this.fromSource = fromSource;
}
public String getFromSourceVersion() {
return fromSourceVersion;
}
public void setFromSourceVersion(String fromSourceVersion) {
this.fromSourceVersion = fromSourceVersion;
}
public String getToSourceVersion() {
return toSourceVersion;
}
public void setToSourceVersion(String toSourceVersion) {
this.toSourceVersion = toSourceVersion;
}
}