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