Coverage Report - org.kuali.rice.krms.impl.repository.PropositionBo
 
Classes in this File Line Coverage Branch Coverage Complexity
PropositionBo
0%
0/16
0%
0/8
0
 
 1  
 package org.kuali.rice.krms.impl.repository
 2  
 
 3  
 
 4  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase
 5  
 
 6  
 import org.kuali.rice.krms.api.repository.Proposition
 7  
 import org.kuali.rice.krms.api.repository.PropositionContract
 8  
 
 9  
 
 10  
 public class PropositionBo extends PersistableBusinessObjectBase implements PropositionContract {
 11  
 
 12  
         def String propId
 13  
         def String description
 14  
         def String typeId
 15  
         def String propositionTypeCode
 16  
         
 17  
         def List<PropositionParameterBo> parameters
 18  
         
 19  
         // Compound parameter related properties
 20  
         def String compoundOpCode
 21  
         def List<PropositionBo> compoundComponents
 22  
         
 23  
         /**
 24  
         * Converts a mutable bo to it's immutable counterpart
 25  
         * @param bo the mutable business object
 26  
         * @return the immutable object
 27  
         */
 28  
    static Proposition to(PropositionBo bo) {
 29  0
            if (bo == null) { return null }
 30  0
            return org.kuali.rice.krms.api.repository.Proposition.Builder.create(bo).build()
 31  
    }
 32  
 
 33  
    /**
 34  
         * Converts a immutable object to it's mutable bo counterpart
 35  
         * @param im immutable object
 36  
         * @return the mutable bo
 37  
         */
 38  
    static PropositionBo from(Proposition im) {
 39  0
            if (im == null) { return null }
 40  
 
 41  0
            PropositionBo bo = new PropositionBo()
 42  0
            bo.propId = im.propId
 43  0
            bo.description = im.description
 44  0
            bo.typeId = im.typeId
 45  0
            bo.propositionTypeCode = im.propositionTypeCode
 46  0
            bo.parameters = new ArrayList<PropositionParameterBo>()
 47  0
            for ( parm in im.parameters){
 48  0
                    bo.parameters.add (PropositionParameterBo.from(parm))
 49  
            }
 50  0
            bo.compoundOpCode = im.compoundOpCode
 51  0
            bo.compoundComponents = new ArrayList<PropositionBo>()
 52  0
            for (prop in im.compoundComponents){
 53  0
                    bo.compoundComponents.add (PropositionBo.from(prop))
 54  
            }
 55  
 
 56  0
            return bo
 57  
    }
 58  
  
 59  
 }