Coverage Report - org.kuali.rice.location.framework.country.CountryEbo
 
Classes in this File Line Coverage Branch Coverage Complexity
CountryEbo
0%
0/11
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  
 
 17  
 
 18  
 
 19  
 
 20  
 
 21  
 
 22  
 package org.kuali.rice.location.framework.country
 23  
 
 24  
 import org.kuali.rice.krad.bo.ExternalizableBusinessObject
 25  
 
 26  
 import org.kuali.rice.location.api.country.Country
 27  
 import org.kuali.rice.location.api.country.CountryContract
 28  
 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable
 29  
 
 30  
 //@ToString
 31  
 class CountryEbo implements MutableInactivatable, CountryContract, ExternalizableBusinessObject {
 32  
   def String code;
 33  
   def String alternateCode;
 34  
   def String name;
 35  
   def boolean restricted;
 36  
   def boolean active;
 37  
   def Long versionNumber
 38  
 
 39  
   /**
 40  
    * Converts a mutable CountryEbo to an immutable Country representation.
 41  
    * @param bo
 42  
    * @return an immutable Country
 43  
    */
 44  
   static Country to(CountryEbo bo) {
 45  0
     if (bo == null) { return null }
 46  0
     return Country.Builder.create(bo).build()
 47  
   }
 48  
 
 49  
   /**
 50  
    * Creates a CountryEbo business object from an immutable representation of a Country.
 51  
    * @param an immutable Country
 52  
    * @return a CountryEbo
 53  
    */
 54  
   static CountryEbo from(Country immutable) {
 55  0
     if (immutable == null) {return null}
 56  
 
 57  0
     CountryEbo bo = new CountryEbo()
 58  0
     bo.code = immutable.code
 59  0
     bo.alternateCode = immutable.alternateCode
 60  0
     bo.name = immutable.name
 61  0
     bo.restricted = immutable.restricted
 62  0
     bo.active = immutable.active
 63  0
     bo.versionNumber = immutable.versionNumber
 64  
 
 65  0
     return bo;
 66  
   }
 67  
 
 68  
   void refresh() { }
 69  
 }