Coverage Report - org.kuali.rice.location.framework.campus.CampusEbo
 
Classes in this File Line Coverage Branch Coverage Complexity
CampusEbo
0%
0/16
0%
0/4
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  
 
 17  
 
 18  
 package org.kuali.rice.location.framework.campus
 19  
 
 20  
 import org.kuali.rice.krad.bo.ExternalizableBusinessObject
 21  
 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable
 22  
 import org.kuali.rice.location.api.campus.CampusContract
 23  
 
 24  
 //@ToString
 25  
 public class CampusEbo implements MutableInactivatable, CampusContract, ExternalizableBusinessObject {
 26  
         private static final long serialVersionUID = 787567094298971223L;
 27  
 
 28  
         def String code;
 29  
         def String name;
 30  
         def String shortName;
 31  
         def String campusTypeCode;
 32  
         def boolean active;
 33  
         def CampusTypeEbo campusType;
 34  
     def Long versionNumber;
 35  
         def String objectId;
 36  
         
 37  
         @Override
 38  
         CampusTypeEbo getCampusType() {
 39  0
                 return campusType
 40  
         }
 41  
         
 42  
         /**
 43  
         * Converts a mutable bo to its immutable counterpart
 44  
         * @param bo the mutable business object
 45  
         * @return the immutable object
 46  
         */
 47  
    static org.kuali.rice.location.api.campus.Campus to(CampusEbo bo) {
 48  0
            if (bo == null) {
 49  0
                    return null
 50  
            }
 51  
 
 52  0
            return org.kuali.rice.location.api.campus.Campus.Builder.create(bo).build();
 53  
    }
 54  
 
 55  
    /**
 56  
         * Converts a immutable object to its mutable counterpart
 57  
         * @param im immutable object
 58  
         * @return the mutable bo
 59  
         */
 60  
    static CampusEbo from(org.kuali.rice.location.api.campus.Campus im) {
 61  0
            if (im == null) {
 62  0
                    return null
 63  
            }
 64  
 
 65  0
            CampusEbo bo = new CampusEbo()
 66  0
            bo.code = im.code
 67  0
            bo.name = im.name
 68  0
            bo.shortName = im.shortName
 69  0
            bo.active = im.active
 70  0
            bo.campusTypeCode = im.campusType.code
 71  
  
 72  0
            bo.campusType = CampusTypeEbo.from(im.campusType)
 73  0
        bo.versionNumber = im.versionNumber
 74  0
            bo.objectId = im.objectId;
 75  
 
 76  0
            return bo
 77  
    }
 78  
    
 79  
    void refresh() { }
 80  
 
 81  
 }