1 | package gov.hhs.fha.nhinc.subscription.repository.data;
|
---|
2 |
|
---|
3 | import java.io.Serializable;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * Data class for a subscription item
|
---|
7 | *
|
---|
8 | * @author Neil Webb
|
---|
9 | */
|
---|
10 | public class SubscriptionItem implements Serializable
|
---|
11 | {
|
---|
12 | private static final long serialVersionUID = 7601908766151278860L;
|
---|
13 | private SubscriptionParticipant subscriber;
|
---|
14 | private SubscriptionParticipant subscribee;
|
---|
15 | private SubscriptionCriteria subscriptionCriteria;
|
---|
16 | private SubscriptionReference subscriptionReference;
|
---|
17 | private SubscriptionReference parentSubscriptionReference;
|
---|
18 |
|
---|
19 | public SubscriptionParticipant getSubscriber()
|
---|
20 | {
|
---|
21 | return subscriber;
|
---|
22 | }
|
---|
23 |
|
---|
24 | public void setSubscriber(SubscriptionParticipant subscriber)
|
---|
25 | {
|
---|
26 | this.subscriber = subscriber;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public SubscriptionParticipant getSubscribee()
|
---|
30 | {
|
---|
31 | return subscribee;
|
---|
32 | }
|
---|
33 |
|
---|
34 | public void setSubscribee(SubscriptionParticipant subscribee)
|
---|
35 | {
|
---|
36 | this.subscribee = subscribee;
|
---|
37 | }
|
---|
38 |
|
---|
39 | public SubscriptionCriteria getSubscriptionCriteria()
|
---|
40 | {
|
---|
41 | return subscriptionCriteria;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public void setSubscriptionCriteria(SubscriptionCriteria subscriptionCriteria)
|
---|
45 | {
|
---|
46 | this.subscriptionCriteria = subscriptionCriteria;
|
---|
47 | }
|
---|
48 |
|
---|
49 | public SubscriptionReference getSubscriptionReference()
|
---|
50 | {
|
---|
51 | return subscriptionReference;
|
---|
52 | }
|
---|
53 |
|
---|
54 | public void setSubscriptionReference(SubscriptionReference subscriptionReference)
|
---|
55 | {
|
---|
56 | this.subscriptionReference = subscriptionReference;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public SubscriptionReference getParentSubscriptionReference()
|
---|
60 | {
|
---|
61 | return parentSubscriptionReference;
|
---|
62 | }
|
---|
63 |
|
---|
64 | public void setParentSubscriptionReference(SubscriptionReference parentSubscriptionReference)
|
---|
65 | {
|
---|
66 | this.parentSubscriptionReference = parentSubscriptionReference;
|
---|
67 | }
|
---|
68 |
|
---|
69 | @Override
|
---|
70 | public boolean equals(Object obj)
|
---|
71 | {
|
---|
72 | if (obj == null)
|
---|
73 | {
|
---|
74 | return false;
|
---|
75 | }
|
---|
76 | if (getClass() != obj.getClass())
|
---|
77 | {
|
---|
78 | return false;
|
---|
79 | }
|
---|
80 | final SubscriptionItem other = (SubscriptionItem) obj;
|
---|
81 | if (this.subscriber != other.subscriber && (this.subscriber == null || !this.subscriber.equals(other.subscriber)))
|
---|
82 | {
|
---|
83 | return false;
|
---|
84 | }
|
---|
85 | if (this.subscribee != other.subscribee && (this.subscribee == null || !this.subscribee.equals(other.subscribee)))
|
---|
86 | {
|
---|
87 | return false;
|
---|
88 | }
|
---|
89 | if (this.subscriptionCriteria != other.subscriptionCriteria && (this.subscriptionCriteria == null || !this.subscriptionCriteria.equals(other.subscriptionCriteria)))
|
---|
90 | {
|
---|
91 | return false;
|
---|
92 | }
|
---|
93 | if (this.subscriptionReference != other.subscriptionReference && (this.subscriptionReference == null || !this.subscriptionReference.equals(other.subscriptionReference)))
|
---|
94 | {
|
---|
95 | return false;
|
---|
96 | }
|
---|
97 | if (this.parentSubscriptionReference != other.parentSubscriptionReference && (this.parentSubscriptionReference == null || !this.parentSubscriptionReference.equals(other.parentSubscriptionReference)))
|
---|
98 | {
|
---|
99 | return false;
|
---|
100 | }
|
---|
101 | return true;
|
---|
102 | }
|
---|
103 |
|
---|
104 | @Override
|
---|
105 | public int hashCode()
|
---|
106 | {
|
---|
107 | int hash = 7;
|
---|
108 | hash = 83 * hash + (this.subscriber != null ? this.subscriber.hashCode() : 0);
|
---|
109 | hash = 83 * hash + (this.subscribee != null ? this.subscribee.hashCode() : 0);
|
---|
110 | hash = 83 * hash + (this.subscriptionCriteria != null ? this.subscriptionCriteria.hashCode() : 0);
|
---|
111 | hash = 83 * hash + (this.subscriptionReference != null ? this.subscriptionReference.hashCode() : 0);
|
---|
112 | hash = 83 * hash + (this.parentSubscriptionReference != null ? this.parentSubscriptionReference.hashCode() : 0);
|
---|
113 | return hash;
|
---|
114 | }
|
---|
115 |
|
---|
116 |
|
---|
117 | }
|
---|