1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.system.context;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 import fr.ifremer.quadrige2.core.dao.referential.pmfm.PmfmImpl;
30 import java.io.Serializable;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33
34
35
36
37 public class PmfmContextOrderPK implements Serializable, Comparable<PmfmContextOrderPK>
38 {
39
40
41
42 private static final long serialVersionUID = 5170093576577811409L;
43
44 public PmfmContextOrderPK()
45 {
46 }
47
48 public PmfmContextOrderPK(ContextImpl context, PmfmImpl pmfm)
49 {
50 this.context = context;
51 this.pmfm = pmfm;
52 }
53
54 private ContextImpl context;
55
56 public ContextImpl getContext()
57 {
58 return this.context;
59 }
60
61 public void setContext(ContextImpl context)
62 {
63 this.context = context;
64 }
65
66 private PmfmImpl pmfm;
67
68 public PmfmImpl getPmfm()
69 {
70 return this.pmfm;
71 }
72
73 public void setPmfm(PmfmImpl pmfm)
74 {
75 this.pmfm = pmfm;
76 }
77
78 @Override
79 public boolean equals(Object object)
80 {
81 if (this == object)
82 {
83 return true;
84 }
85 if (!(object instanceof PmfmContextOrderPK))
86 {
87 return false;
88 }
89 final PmfmContextOrderPK that = (PmfmContextOrderPK)object;
90 return new EqualsBuilder()
91 .append(this.getContext(),that.getContext())
92 .append(this.getPmfm(),that.getPmfm())
93 .isEquals();
94 }
95
96 @Override
97 public int hashCode()
98 {
99 return new HashCodeBuilder()
100 .append(getContext())
101 .append(getPmfm())
102 .toHashCode();
103 }
104
105
106
107
108 @Override
109 public int compareTo(PmfmContextOrderPK o)
110 {
111 int cmp = 0;
112 return cmp;
113 }
114 }