This project has retired. For details please refer to its
Attic page.
ServiceProjectionId xref
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.juddi.model;
18
19 import javax.persistence.Column;
20 import javax.persistence.Embeddable;
21
22
23
24
25
26
27 @Embeddable
28 public class ServiceProjectionId implements java.io.Serializable {
29
30 private static final long serialVersionUID = 3146022787279005205L;
31 @Column(name = "business_key", nullable = false, length = 255)
32 String businessKey;
33 @Column(name = "service_key", nullable = false, length = 255)
34 String serviceKey;
35
36 public ServiceProjectionId() {
37 }
38 public ServiceProjectionId(String businessKey, String serviceKey) {
39 this.businessKey = businessKey;
40 this.serviceKey = serviceKey;
41 }
42
43 public int hashCode() {
44 final int prime = 31;
45 int result = 1;
46 result = prime * result
47 + ((businessKey == null) ? 0 : businessKey.hashCode());
48 result = prime * result
49 + ((serviceKey == null) ? 0 : serviceKey.hashCode());
50 return result;
51 }
52 public boolean equals(Object obj) {
53 if (this == obj)
54 return true;
55 if (obj == null)
56 return false;
57 if (getClass() != obj.getClass())
58 return false;
59 ServiceProjectionId other = (ServiceProjectionId) obj;
60 if (businessKey == null) {
61 if (other.businessKey != null)
62 return false;
63 } else if (!businessKey.equals(other.businessKey))
64 return false;
65 if (serviceKey == null) {
66 if (other.serviceKey != null)
67 return false;
68 } else if (!serviceKey.equals(other.serviceKey))
69 return false;
70 return true;
71 }
72
73 }