01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.clientapp.vo;
18:
19: /**
20: * Super class for all user id transport objects.
21: *
22: * @author rkirkend
23: * @author ewestfal
24: *
25: * @workflow.webservice-object
26: */
27: public abstract class UserIdVO extends RecipientIdVO {
28:
29: private String id;
30:
31: public UserIdVO() {
32: }
33:
34: public UserIdVO(String id) {
35: this .id = id;
36: }
37:
38: protected String getId() {
39: return id;
40: }
41:
42: protected void setId(String id) {
43: this .id = id;
44: }
45:
46: public boolean equals(Object object) {
47: if (getClass().isInstance(object)) {
48: String objectId = ((UserIdVO) object).getId();
49: return ((getId() == null && objectId == null) || (getId() != null && getId()
50: .equals(objectId)));
51: }
52: return false;
53: }
54:
55: public int hashCode() {
56: return (getId() == null ? 0 : getId().hashCode());
57: }
58:
59: public String toString() {
60: return (getId() == null ? "null" : getId());
61: }
62:
63: }
|