Coverage Report - org.kuali.rice.krms.impl.repository.TermBo
 
Classes in this File Line Coverage Branch Coverage Complexity
TermBo
0%
0/14
0%
0/6
0
 
 1  
 package org.kuali.rice.krms.impl.repository
 2  
 
 3  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 4  
 
 5  
 import org.kuali.rice.krms.api.repository.term.TermDefinition;
 6  
 import org.kuali.rice.krms.api.repository.term.TermDefinitionContract;
 7  
 
 8  
 
 9  
 public class TermBo extends PersistableBusinessObjectBase implements TermDefinitionContract {
 10  
 
 11  
         def String id
 12  
         def String specificationId
 13  
 
 14  
         def TermSpecificationBo specification
 15  
         def List<TermParameterBo> parameters
 16  
 
 17  
         /**
 18  
         * Converts a mutable bo to it's immutable counterpart
 19  
         * @param bo the mutable business object
 20  
         * @return the immutable object
 21  
         */
 22  
    static TermDefinition to(TermBo bo) {
 23  0
            if (bo == null) { return null }
 24  0
            return org.kuali.rice.krms.api.repository.term.TermDefinition.Builder.create(bo).build()
 25  
    }
 26  
 
 27  
    /**
 28  
         * Converts a immutable object to it's mutable bo counterpart
 29  
         * @param im immutable object
 30  
         * @return the mutable bo
 31  
         */
 32  
    static TermBo from(TermDefinition im) {
 33  0
            if (im == null) { return null }
 34  
 
 35  0
            TermBo bo = new TermBo()
 36  0
            bo.id = im.id
 37  0
            bo.specificationId = im.specification.id
 38  0
            bo.specification = TermSpecificationBo.from(im.specification)
 39  0
            bo.parameters = new ArrayList<TermParameterBo>()
 40  0
            for (parm in im.parameters){
 41  0
                    bo.parameters.add ( TermParameterBo.from(parm) )
 42  
            }
 43  0
            bo.versionNumber = im.versionNumber
 44  0
            return bo
 45  
    }
 46  
 
 47  
    public TermSpecificationBo getSpecification(){
 48  0
            return specification
 49  
    }
 50  
 
 51  
    public List<TermParameterBo> getParameters(){
 52  0
            return parameters
 53  
    }
 54  
 
 55  
 }