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