| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.rice.kim.impl.type |
| 18 | |
|
| 19 | |
import org.kuali.rice.kim.api.type.KimType |
| 20 | |
import org.kuali.rice.kim.api.type.KimTypeContract |
| 21 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
| 22 | |
|
| 23 | |
class KimTypeBo extends PersistableBusinessObjectBase implements KimTypeContract { |
| 24 | |
String id |
| 25 | |
String serviceName |
| 26 | |
String namespaceCode |
| 27 | |
String name |
| 28 | |
List<KimTypeAttributeBo> attributeDefinitions |
| 29 | |
boolean active |
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
static KimType to(KimTypeBo bo) { |
| 37 | 6 | if (bo == null) { |
| 38 | 0 | return null |
| 39 | |
} |
| 40 | |
|
| 41 | 6 | return KimType.Builder.create(bo).build(); |
| 42 | |
} |
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
|
| 49 | |
static KimTypeBo from(KimType im) { |
| 50 | 8 | if (im == null) { |
| 51 | 0 | return null |
| 52 | |
} |
| 53 | |
|
| 54 | 8 | KimTypeBo bo = new KimTypeBo() |
| 55 | 8 | bo.id = im.id |
| 56 | 8 | bo.serviceName = im.serviceName |
| 57 | 8 | bo.namespaceCode = im.namespaceCode |
| 58 | 8 | bo.name = im.name |
| 59 | 0 | bo.attributeDefinitions = im.attributeDefinitions != null ? im.attributeDefinitions.collect { KimTypeAttributeBo.from(it) } : new ArrayList() |
| 60 | 8 | bo.active = im.active |
| 61 | 8 | bo.versionNumber = im.versionNumber |
| 62 | 8 | bo.objectId = im.objectId |
| 63 | |
|
| 64 | 8 | return bo |
| 65 | |
} |
| 66 | |
} |