| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| EntityCitizenshipStatusEbo |
|
| 0.0;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.kim.framework.identity.citizenship | |
| 17 | ||
| 18 | import org.kuali.rice.kim.api.identity.CodedAttributeContract | |
| 19 | import org.kuali.rice.krad.bo.ExternalizableBusinessObject | |
| 20 | import org.kuali.rice.kim.api.identity.CodedAttribute | |
| 21 | ||
| 22 | class EntityCitizenshipStatusEbo implements CodedAttributeContract, ExternalizableBusinessObject { | |
| 23 | String code; | |
| 24 | String name; | |
| 25 | boolean active; | |
| 26 | String sortCode; | |
| 27 | Long versionNumber; | |
| 28 | String objectId; | |
| 29 | ||
| 30 | ||
| 31 | /** | |
| 32 | * Converts a mutable EntityCitizenshipStatusEbo to an immutable EntityCitizenshipStatus representation. | |
| 33 | * @param bo | |
| 34 | * @return an immutable EntityCitizenshipStatus | |
| 35 | */ | |
| 36 | static CodedAttribute to(EntityCitizenshipStatusEbo bo) { | |
| 37 | 0 | if (bo == null) { return null } |
| 38 | 0 | return CodedAttribute.Builder.create(bo).build() |
| 39 | } | |
| 40 | ||
| 41 | /** | |
| 42 | * Creates a EntityCitizenshipStatusEbo business object from an immutable representation of a EntityCitizenshipStatus. | |
| 43 | * @param an immutable EntityCitizenshipStatus | |
| 44 | * @return a EntityCitizenshipStatusEbo | |
| 45 | */ | |
| 46 | static EntityCitizenshipStatusEbo from(CodedAttribute immutable) { | |
| 47 | 0 | if (immutable == null) {return null} |
| 48 | ||
| 49 | 0 | EntityCitizenshipStatusEbo bo = new EntityCitizenshipStatusEbo() |
| 50 | 0 | bo.code = immutable.code |
| 51 | 0 | bo.name = immutable.name |
| 52 | 0 | bo.sortCode = immutable.sortCode |
| 53 | 0 | bo.active = immutable.active |
| 54 | 0 | bo.versionNumber = immutable.versionNumber |
| 55 | 0 | bo.objectId = immutable.objectId |
| 56 | ||
| 57 | 0 | return bo; |
| 58 | } | |
| 59 | ||
| 60 | void refresh() { } | |
| 61 | } |