Coverage Report - org.kuali.rice.krms.impl.repository.FunctionParameterBo
 
Classes in this File Line Coverage Branch Coverage Complexity
FunctionParameterBo
0%
0/23
0%
0/12
0
 
 1  
 package org.kuali.rice.krms.impl.repository
 2  
 
 3  
 import javax.persistence.Column
 4  
 import javax.persistence.Entity
 5  
 import javax.persistence.GeneratedValue
 6  
 import javax.persistence.Id
 7  
 import javax.persistence.Table
 8  
 import org.hibernate.annotations.GenericGenerator
 9  
 import org.hibernate.annotations.Parameter
 10  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase
 11  
 import org.kuali.rice.krms.api.repository.function.FunctionParameterDefinition
 12  
 import org.kuali.rice.krms.api.repository.function.FunctionParameterDefinitionContract
 13  
 
 14  
 public class FunctionParameterBo extends PersistableBusinessObjectBase implements FunctionParameterDefinitionContract {
 15  
 
 16  
         def String id
 17  
         def String name
 18  
         def String description
 19  
         def String functionId
 20  
         def String parameterType
 21  
         def Integer sequenceNumber
 22  
         
 23  
         
 24  
         /**
 25  
         * Converts a mutable bo to it's immutable counterpart
 26  
         * @param bo the mutable business object
 27  
         * @return the immutable object
 28  
         */
 29  
    static FunctionParameterDefinition to(FunctionParameterBo bo) {
 30  0
            if (bo == null) { return null }
 31  0
            return org.kuali.rice.krms.api.repository.function.FunctionParameterDefinition.Builder.create(bo).build()
 32  
    }
 33  
 
 34  
         /**
 35  
         * Converts a list of mutable bos to it's immutable counterpart
 36  
         * @param bos the list of mutable business objects
 37  
         * @return and immutable list containing the immutable objects
 38  
         */
 39  
    static List<FunctionParameterDefinition> to(List<FunctionParameterBo> bos) {
 40  0
            if (bos == null) { return null }
 41  0
            List<FunctionParameterDefinition> parms = new ArrayList<FunctionParameterDefinition>();
 42  0
            for (FunctionParameterBo p : bos){
 43  0
                    parms.add(FunctionParameterDefinition.Builder.create(p).build())
 44  
            }
 45  0
            return Collections.unmodifiableList(parms)
 46  
    }
 47  
    /**
 48  
         * Converts a immutable object to it's mutable bo counterpart
 49  
         * @param im immutable object
 50  
         * @return the mutable bo
 51  
         */
 52  
    static FunctionParameterBo from(FunctionParameterDefinition im) {
 53  0
            if (im == null) { return null }
 54  
 
 55  0
            FunctionParameterBo bo = new FunctionParameterBo()
 56  0
            bo.id = im.id
 57  0
            bo.name = im.name
 58  0
            bo.description = im.description
 59  0
            bo.functionId = im.functionId
 60  0
            bo.parameterType = im.parameterType
 61  0
            bo.sequenceNumber = im.sequenceNumber
 62  0
            bo.versionNumber = im.versionNumber
 63  0
            return bo
 64  
    }
 65  
    
 66  
    static List<FunctionParameterBo> from(List<FunctionParameterDefinition> ims){
 67  0
            if (ims == null) {return null }
 68  0
            List<FunctionParameterBo> bos = new ArrayList<FunctionParameterBo>();
 69  0
            for (FunctionParameterBo im : ims){
 70  0
                    FunctionParameterBo bo = from(im)
 71  0
                       bos.add(bo);
 72  
            }
 73  0
            return Collections.unmodifiableList(bos)
 74  
    }
 75  
  
 76  
 }