Revision 49899
Added by Claudio Atzori over 6 years ago
ApiParamKey.java | ||
---|---|---|
3 | 3 |
import java.io.Serializable; |
4 | 4 |
import java.util.Objects; |
5 | 5 |
|
6 |
import javax.persistence.Embeddable; |
|
7 |
import javax.persistence.JoinColumn; |
|
8 |
import javax.persistence.ManyToOne; |
|
9 |
import javax.persistence.MappedSuperclass; |
|
10 |
|
|
6 | 11 |
import com.google.common.collect.ComparisonChain; |
7 | 12 |
|
8 | 13 |
/** |
9 | 14 |
* Created by claudio on 13/04/2017. |
10 | 15 |
*/ |
16 |
@Embeddable |
|
17 |
@MappedSuperclass |
|
18 |
public class ApiParamKey<A extends Api> implements Serializable { |
|
11 | 19 |
|
12 |
public class ApiParamKey implements Serializable { |
|
13 |
|
|
14 | 20 |
/** |
15 | 21 |
* |
16 | 22 |
*/ |
17 |
private static final long serialVersionUID = 1640636806392015938L;
|
|
23 |
protected static final long serialVersionUID = 1640636806392015938L;
|
|
18 | 24 |
|
19 |
private Api api = null; |
|
25 |
@ManyToOne |
|
26 |
@JoinColumn(name = "api") |
|
27 |
protected A api = null; |
|
20 | 28 |
|
21 |
private String param;
|
|
29 |
protected String param;
|
|
22 | 30 |
|
23 | 31 |
public ApiParamKey() {} |
24 | 32 |
|
... | ... | |
31 | 39 |
return this; |
32 | 40 |
} |
33 | 41 |
|
34 |
public Api getApi() {
|
|
42 |
public A getApi() { |
|
35 | 43 |
return api; |
36 | 44 |
} |
37 | 45 |
|
38 |
public void setApi(final Api api) {
|
|
46 |
public void setApi(final A api) { |
|
39 | 47 |
this.api = api; |
40 | 48 |
} |
41 | 49 |
|
Also available in: Unified diff
added javax.persistance annotations