Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IdEntityInfo |
|
| 1.25;1.25 |
1 | /* | |
2 | * Copyright 2010 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the | |
5 | * "License"); you may not use this file except in compliance with the | |
6 | * License. You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.osedu.org/licenses/ECL-2.0 | |
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 | |
13 | * implied. See the License for the specific language governing | |
14 | * permissions and limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.student.r2.common.dto; | |
18 | ||
19 | import java.io.Serializable; | |
20 | ||
21 | import javax.xml.bind.annotation.XmlAttribute; | |
22 | import javax.xml.bind.annotation.XmlTransient; | |
23 | ||
24 | import org.kuali.student.r2.common.infc.IdEntity; | |
25 | ||
26 | /** | |
27 | * Information for entities identified by an Id. | |
28 | * | |
29 | * @author Kuali Student Team (sambit) | |
30 | */ | |
31 | ||
32 | @SuppressWarnings("serial") | |
33 | @XmlTransient | |
34 | public abstract class IdEntityInfo | |
35 | extends EntityInfo | |
36 | implements IdEntity, Serializable { | |
37 | ||
38 | @XmlAttribute | |
39 | private String id; | |
40 | ||
41 | ||
42 | /** | |
43 | * Constructs a new IdEntityInfo. | |
44 | */ | |
45 | 0 | protected IdEntityInfo() { |
46 | 0 | } |
47 | ||
48 | /** | |
49 | * Constructs a new IdEntityInfo from another IdEntity. | |
50 | * | |
51 | * @param idEntity the IdEntity to copy | |
52 | */ | |
53 | public IdEntityInfo(IdEntity idEntity) { | |
54 | 0 | super(idEntity); |
55 | ||
56 | 0 | if (idEntity != null) { |
57 | 0 | this.id = idEntity.getId(); |
58 | } | |
59 | 0 | } |
60 | ||
61 | @Override | |
62 | public String getId() { | |
63 | 0 | return id; |
64 | } | |
65 | ||
66 | public void setId(String id) { | |
67 | 0 | this.id = id; |
68 | 0 | } |
69 | } |