Coverage Report - org.kuali.rice.kew.impl.type.KewAttributeDefinitionBo
 
Classes in this File Line Coverage Branch Coverage Complexity
KewAttributeDefinitionBo
0%
0/13
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.kew.impl.type
 17  
 
 18  
 import org.kuali.rice.kew.api.repository.type.KewAttributeDefinition
 19  
 import org.kuali.rice.kew.api.repository.type.KewAttributeDefinitionContract
 20  
 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable
 21  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 22  
 
 23  
 public class KewAttributeDefinitionBo extends PersistableBusinessObjectBase implements KewAttributeDefinitionContract, MutableInactivatable{
 24  
 
 25  
         def String id
 26  
         def String name
 27  
         def String namespace
 28  
         def String label
 29  
     def String description
 30  
         def boolean active
 31  
         def String componentName   
 32  
     
 33  
     /**
 34  
     * Converts a mutable bo to it's immutable counterpart
 35  
     * @param bo the mutable business object
 36  
     * @return the immutable object
 37  
     */
 38  
    static KewAttributeDefinition to(KewAttributeDefinitionBo bo) {
 39  0
        if (bo == null) { return null }
 40  0
        return org.kuali.rice.kew.api.repository.type.KewAttributeDefinition.Builder.create(bo).build()
 41  
    }
 42  
 
 43  
    /**
 44  
     * Converts a immutable object to it's mutable bo counterpart
 45  
     * @param im immutable object
 46  
     * @return the mutable bo
 47  
     */
 48  
    static KewAttributeDefinitionBo from(KewAttributeDefinition im) {
 49  0
        if (im == null) { return null }
 50  
 
 51  0
        KewAttributeDefinitionBo bo = new KewAttributeDefinitionBo()
 52  0
        bo.id = im.id
 53  0
        bo.name = im.name
 54  0
        bo.namespace = im.namespace
 55  0
        bo.label = im.label
 56  0
        bo.description = im.description
 57  0
        bo.active = im.active
 58  0
        bo.componentName = im.componentName
 59  0
        bo.versionNumber = im.versionNumber
 60  0
        return bo
 61  
    }
 62  
  
 63  
  
 64  
 }