Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IdNamelessEntityInfo |
|
| 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.IdNamelessEntity; | |
25 | ||
26 | /** | |
27 | * Provides basic method for a nameless entity. It's the same as an | |
28 | * IdEntity without the name and description because Norm doesn't like | |
29 | * names and descriptions in Relationships. | |
30 | * | |
31 | * @author tom | |
32 | */ | |
33 | ||
34 | @SuppressWarnings("serial") | |
35 | @XmlTransient | |
36 | public abstract class IdNamelessEntityInfo | |
37 | extends TypeStateEntityInfo | |
38 | implements IdNamelessEntity, Serializable { | |
39 | ||
40 | @XmlAttribute | |
41 | private String id; | |
42 | ||
43 | ||
44 | /** | |
45 | * Constructs a new IdNamelessEntityInfo. | |
46 | */ | |
47 | 0 | protected IdNamelessEntityInfo() { |
48 | 0 | } |
49 | ||
50 | /** | |
51 | * Constructs a new IdNamelessEntityInfo from another IdNamelessEntity. | |
52 | * | |
53 | * @param entity the IdNamelessEntity to copy | |
54 | */ | |
55 | public IdNamelessEntityInfo(IdNamelessEntity entity) { | |
56 | 0 | super(entity); |
57 | ||
58 | 0 | if (entity != null) { |
59 | 0 | this.id = entity.getId(); |
60 | } | |
61 | 0 | } |
62 | ||
63 | @Override | |
64 | public String getId() { | |
65 | 0 | return id; |
66 | } | |
67 | ||
68 | public void setId(String id) { | |
69 | 0 | this.id = id; |
70 | 0 | } |
71 | } |