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