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