source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/SubscriptionRepository/src/gov/hhs/fha/nhinc/subscription/repository/data/SubscriptionParticipant.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 2.3 KB
Line 
1package gov.hhs.fha.nhinc.subscription.repository.data;
2
3import java.io.Serializable;
4
5/**
6 * Class for participants in a subscription
7 *
8 * @author Neil Webb
9 */
10public class SubscriptionParticipant implements Serializable
11{
12 private static final long serialVersionUID = 6464393602956231914L;
13 private Community community;
14 private String notificationEndpointAddress;
15 private String userAddress;
16
17 public Community getCommunity()
18 {
19 return community;
20 }
21
22 public void setCommunity(Community community)
23 {
24 this.community = community;
25 }
26
27 public String getNotificationEndpointAddress()
28 {
29 return notificationEndpointAddress;
30 }
31
32 public void setNotificationEndpointAddress(String notificationEndpointAddress)
33 {
34 this.notificationEndpointAddress = notificationEndpointAddress;
35 }
36
37 public String getUserAddress()
38 {
39 return userAddress;
40 }
41
42 public void setUserAddress(String userAddress)
43 {
44 this.userAddress = userAddress;
45 }
46
47 @Override
48 public boolean equals(Object obj)
49 {
50 if (obj == null)
51 {
52 return false;
53 }
54 if (getClass() != obj.getClass())
55 {
56 return false;
57 }
58 final SubscriptionParticipant other = (SubscriptionParticipant) obj;
59 if (this.community != other.community && (this.community == null || !this.community.equals(other.community)))
60 {
61 return false;
62 }
63 if (this.notificationEndpointAddress != other.notificationEndpointAddress && (this.notificationEndpointAddress == null || !this.notificationEndpointAddress.equals(other.notificationEndpointAddress)))
64 {
65 return false;
66 }
67 if (this.userAddress != other.userAddress && (this.userAddress == null || !this.userAddress.equals(other.userAddress)))
68 {
69 return false;
70 }
71 return true;
72 }
73
74 @Override
75 public int hashCode()
76 {
77 int hash = 7;
78 hash = 19 * hash + (this.community != null ? this.community.hashCode() : 0);
79 hash = 19 * hash + (this.notificationEndpointAddress != null ? this.notificationEndpointAddress.hashCode() : 0);
80 hash = 19 * hash + (this.userAddress != null ? this.userAddress.hashCode() : 0);
81 return hash;
82 }
83
84
85}
Note: See TracBrowser for help on using the repository browser.