Coverage Report - org.kuali.rice.krms.impl.repository.RuleAttributeBo
 
Classes in this File Line Coverage Branch Coverage Complexity
RuleAttributeBo
0%
0/11
0%
0/4
0
 
 1  
 package org.kuali.rice.krms.impl.repository
 2  
 
 3  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase
 4  
 
 5  
 import org.kuali.rice.krms.api.repository.RuleAttribute
 6  
 import org.kuali.rice.krms.api.repository.RuleAttributeContract
 7  
 import org.kuali.rice.krms.api.repository.KrmsAttributeDefinition
 8  
 
 9  
 public class RuleAttributeBo extends PersistableBusinessObjectBase implements RuleAttributeContract{
 10  
 
 11  
         def String id
 12  
         def String ruleId
 13  
         def String attributeDefinitionId
 14  
         def String value
 15  
         
 16  
         def KrmsAttributeDefinition attributeDefinition
 17  
         
 18  
         
 19  
         /**
 20  
         * Converts a mutable bo to it's immutable counterpart
 21  
         * @param bo the mutable business object
 22  
         * @return the immutable object
 23  
         */
 24  
    static RuleAttribute to(RuleAttributeBo bo) {
 25  0
            if (bo == null) { return null }
 26  0
            return org.kuali.rice.krms.api.repository.RuleAttribute.Builder.create(bo).build()
 27  
    }
 28  
 
 29  
    /**
 30  
         * Converts a immutable object to it's mutable bo counterpart
 31  
         * @param im immutable object
 32  
         * @return the mutable bo
 33  
         */
 34  
    static RuleAttributeBo from(RuleAttribute im) {
 35  0
            if (im == null) { return null }
 36  
 
 37  0
            RuleAttributeBo bo = new RuleAttributeBo()
 38  0
            bo.id = im.id
 39  0
            bo.ruleId = im.ruleId
 40  0
            bo.attributeDefinitionId = im.attributeDefinitionId
 41  0
            bo.attributeValue = im.value
 42  0
            bo.attributeDefinition = KrmsAttributeDefinitionBo.from( im.attributeDefinition )
 43  
 
 44  0
            return bo
 45  
    }
 46  
 
 47  
    @Override
 48  
    KrmsAttributeDefinitionBo getAttributeDefinition() {
 49  0
            return attributeDefinition
 50  
    }
 51  
 }