Coverage Report - org.kuali.rice.krms.impl.repository.TermResolverParameterSpecificationBo
 
Classes in this File Line Coverage Branch Coverage Complexity
TermResolverParameterSpecificationBo
0%
0/8
0%
0/6
0
 
 1  
 package org.kuali.rice.krms.impl.repository
 2  
 
 3  
 import org.apache.commons.lang.StringUtils;
 4  
 
 5  
 
 6  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 7  
 
 8  
 import org.kuali.rice.krms.api.repository.term.TermResolverDefinition;
 9  
 
 10  
 
 11  
 public class TermResolverParameterSpecificationBo extends PersistableBusinessObjectBase {
 12  
 
 13  
         def String id
 14  
         def String termResolverId
 15  
         def String name
 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 String to(TermResolverParameterSpecificationBo bo) {
 23  0
            if (bo == null) { return null }
 24  0
            return bo.name;
 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 TermResolverParameterSpecificationBo from(TermResolverDefinition resolver, String name) {
 33  0
            if (resolver == null) { return null }
 34  0
            if (StringUtils.isBlank(name)) { return null }
 35  
 
 36  0
            TermResolverParameterSpecificationBo bo = new TermResolverParameterSpecificationBo()
 37  0
            bo.termResolverId = resolver.id;
 38  0
            bo.name = name;
 39  
 
 40  0
            return bo
 41  
    }
 42  
  
 43  
 }