Coverage Report - org.kuali.rice.krms.impl.repository.TermParameterBo
 
Classes in this File Line Coverage Branch Coverage Complexity
TermParameterBo
0%
0/10
0%
0/8
0
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krms.impl.repository
 17  
 
 18  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 19  
 import org.kuali.rice.krms.api.repository.term.TermParameterDefinition;
 20  
 import org.kuali.rice.krms.api.repository.term.TermParameterDefinitionContract;
 21  
 
 22  
 public class TermParameterBo extends PersistableBusinessObjectBase implements TermParameterDefinitionContract{
 23  
 
 24  
         def String id
 25  
         def String termId
 26  
         def String name
 27  
         def String value
 28  
                 
 29  
         /**
 30  
         * Converts a mutable bo to it's immutable counterpart
 31  
         * @param bo the mutable business object
 32  
         * @return the immutable object
 33  
         */
 34  
    static TermParameterDefinition to(TermParameterBo bo) {
 35  0
            if (bo == null) { return null }
 36  0
            return org.kuali.rice.krms.api.repository.term.TermParameterDefinition.Builder.create(bo).build()
 37  
    }
 38  
 
 39  
    /**
 40  
         * Converts a immutable object to it's mutable bo counterpart
 41  
         * @param im immutable object
 42  
         * @return the mutable bo
 43  
         */
 44  
    static TermParameterBo from(TermParameterDefinition im) {
 45  0
            if (im == null) { return null }
 46  
 
 47  0
            TermParameterBo bo = new TermParameterBo()
 48  0
            bo.id = im.id
 49  0
            bo.termId = im.termId
 50  0
            bo.name = im.name
 51  0
            bo.value = im.value
 52  0
            bo.versionNumber = im.versionNumber
 53  
            
 54  0
            return bo
 55  
    }
 56  
  
 57  
 }