Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
OrgPositionRestrictionInfo |
|
| 1.05;1.05 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | */ | |
15 | ||
16 | package org.kuali.student.core.organization.dto; | |
17 | ||
18 | import java.io.Serializable; | |
19 | import java.util.HashMap; | |
20 | import java.util.Map; | |
21 | ||
22 | import javax.xml.bind.annotation.XmlAccessType; | |
23 | import javax.xml.bind.annotation.XmlAccessorType; | |
24 | import javax.xml.bind.annotation.XmlAttribute; | |
25 | import javax.xml.bind.annotation.XmlElement; | |
26 | import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | |
27 | ||
28 | import org.kuali.student.core.dto.HasAttributes; | |
29 | import org.kuali.student.core.dto.Idable; | |
30 | import org.kuali.student.core.dto.MetaInfo; | |
31 | import org.kuali.student.core.dto.TimeAmountInfo; | |
32 | import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter; | |
33 | ||
34 | /** | |
35 | *Information which constrains/describes organization to person relationships of a particular type for an organization. These constraints/descriptions typically involve active relationships. | |
36 | */ | |
37 | @XmlAccessorType(XmlAccessType.FIELD) | |
38 | 0 | public class OrgPositionRestrictionInfo implements Serializable, Idable, HasAttributes { |
39 | ||
40 | private static final long serialVersionUID = 1L; | |
41 | ||
42 | @XmlElement | |
43 | private String orgId; | |
44 | ||
45 | @XmlElement | |
46 | private String orgPersonRelationTypeKey; | |
47 | ||
48 | @XmlElement | |
49 | private String desc; | |
50 | ||
51 | @XmlElement | |
52 | private String title; | |
53 | ||
54 | @XmlElement | |
55 | private TimeAmountInfo stdDuration; | |
56 | ||
57 | @XmlElement | |
58 | private Integer minNumRelations; | |
59 | ||
60 | @XmlElement | |
61 | private String maxNumRelations; | |
62 | ||
63 | @XmlElement | |
64 | @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class) | |
65 | private Map<String, String> attributes; | |
66 | ||
67 | @XmlElement | |
68 | private MetaInfo metaInfo; | |
69 | ||
70 | @XmlAttribute | |
71 | private String id; | |
72 | ||
73 | /** | |
74 | * Organization the restriction applies to. | |
75 | */ | |
76 | public String getOrgId() { | |
77 | 0 | return orgId; |
78 | } | |
79 | ||
80 | public void setOrgId(String orgId) { | |
81 | 0 | this.orgId = orgId; |
82 | 0 | } |
83 | ||
84 | /** | |
85 | * Organization to person relationship type the restriction applies to. | |
86 | */ | |
87 | public String getOrgPersonRelationTypeKey() { | |
88 | 0 | return orgPersonRelationTypeKey; |
89 | } | |
90 | ||
91 | public void setOrgPersonRelationTypeKey(String orgPersonRelationTypeKey) { | |
92 | 0 | this.orgPersonRelationTypeKey = orgPersonRelationTypeKey; |
93 | 0 | } |
94 | ||
95 | /** | |
96 | * Description of the restrictions and use of the relationship type within this particular organization. This should primarily focus on deviations from the standard use of the relationship type. | |
97 | */ | |
98 | public String getDesc() { | |
99 | 0 | return desc; |
100 | } | |
101 | ||
102 | public void setDesc(String desc) { | |
103 | 0 | this.desc = desc; |
104 | 0 | } |
105 | ||
106 | /** | |
107 | * Title of organization person relationships of this type. This allows for distinction from the name of the relationship type itself, specific for the given organization. | |
108 | */ | |
109 | public String getTitle() { | |
110 | 0 | return title; |
111 | } | |
112 | ||
113 | public void setTitle(String title) { | |
114 | 0 | this.title = title; |
115 | 0 | } |
116 | ||
117 | /** | |
118 | * Describes the standard duration of relationships of this type. | |
119 | */ | |
120 | public TimeAmountInfo getStdDuration() { | |
121 | 0 | return stdDuration; |
122 | } | |
123 | ||
124 | public void setStdDuration(TimeAmountInfo stdDuration) { | |
125 | 0 | this.stdDuration = stdDuration; |
126 | 0 | } |
127 | ||
128 | /** | |
129 | * Acts as a lower bound on the number of relationships of this type expected for the organization. If specified, this should be less than or equal to the value of maxNumRelations | |
130 | */ | |
131 | public Integer getMinNumRelations() { | |
132 | 0 | return minNumRelations; |
133 | } | |
134 | ||
135 | public void setMinNumRelations(Integer minNumRelations) { | |
136 | 0 | this.minNumRelations = minNumRelations; |
137 | 0 | } |
138 | ||
139 | /** | |
140 | * Acts as an upper bound on the number of relationships of this type expected for the organization. The values of this field are restricted to integer values and the string "unbounded". If specified, this should be greater than or equal to the value of minNumRelations, with the value "unbounded" being automatically assumed to be greater. | |
141 | */ | |
142 | public String getMaxNumRelations() { | |
143 | 0 | return maxNumRelations; |
144 | } | |
145 | ||
146 | public void setMaxNumRelations(String maxNumRelations) { | |
147 | 0 | this.maxNumRelations = maxNumRelations; |
148 | 0 | } |
149 | ||
150 | /** | |
151 | * List of key/value pairs, typically used for dynamic attributes. | |
152 | */ | |
153 | public Map<String, String> getAttributes() { | |
154 | 0 | if (attributes == null) { |
155 | 0 | attributes = new HashMap<String, String>(); |
156 | } | |
157 | 0 | return attributes; |
158 | } | |
159 | ||
160 | public void setAttributes(Map<String, String> attributes) { | |
161 | 0 | this.attributes = attributes; |
162 | 0 | } |
163 | ||
164 | /** | |
165 | * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations. | |
166 | */ | |
167 | public MetaInfo getMetaInfo() { | |
168 | 0 | return metaInfo; |
169 | } | |
170 | ||
171 | public void setMetaInfo(MetaInfo metaInfo) { | |
172 | 0 | this.metaInfo = metaInfo; |
173 | 0 | } |
174 | ||
175 | /** | |
176 | * Unique identifier for the organization position restriction record. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. Once set by the service, this should be seen as read-only and immutable. This structure is not retrievable by this identifier to limit the number of active organization position restriction records visible through the service. It is strongly recommended that this identifier not be referenced by outside consumers. | |
177 | */ | |
178 | public String getId() { | |
179 | 0 | return id; |
180 | } | |
181 | ||
182 | public void setId(String id) { | |
183 | 0 | this.id = id; |
184 | 0 | } |
185 | } |