| 1 | |
package org.kuali.rice.krms.impl.repository |
| 2 | |
|
| 3 | |
import org.kuali.rice.kns.bo.Inactivateable |
| 4 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase |
| 5 | |
import org.kuali.rice.krms.api.repository.KrmsTypeContract; |
| 6 | |
|
| 7 | |
public class KrmsTypeBo extends PersistableBusinessObjectBase implements Inactivateable, KrmsTypeContract { |
| 8 | |
|
| 9 | |
def String id |
| 10 | |
def String name |
| 11 | |
def String namespace |
| 12 | |
def String serviceName |
| 13 | |
def boolean active |
| 14 | |
def List<KrmsTypeAttributeBo> attributes |
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
static org.kuali.rice.krms.api.repository.KrmsType to(KrmsTypeBo bo) { |
| 21 | 0 | if (bo == null) { return null } |
| 22 | 0 | return org.kuali.rice.krms.api.repository.KrmsType.Builder.create(bo).build(); |
| 23 | |
} |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
static KrmsTypeBo from(org.kuali.rice.krms.api.repository.KrmsType im) { |
| 31 | 0 | if (im == null) { return null } |
| 32 | |
|
| 33 | 0 | KrmsTypeBo bo = new KrmsTypeBo() |
| 34 | 0 | bo.id = im.id |
| 35 | 0 | bo.name = im.name |
| 36 | 0 | bo.namespace = im.namespace |
| 37 | 0 | bo.serviceName = im.serviceName |
| 38 | 0 | bo.active = im.active |
| 39 | 0 | bo.attributes = new ArrayList<KrmsTypeAttributeBo>() |
| 40 | 0 | for( attr in im.attributes ){ |
| 41 | 0 | bo.attributes.add(KrmsTypeAttributeBo.from(attr)) |
| 42 | |
} |
| 43 | 0 | return bo |
| 44 | |
} |
| 45 | |
|
| 46 | |
} |