Revision 47676
Added by Claudio Atzori almost 7 years ago
Datasource.java | ||
---|---|---|
4 | 4 |
import java.util.Set; |
5 | 5 |
import javax.persistence.*; |
6 | 6 |
|
7 |
import com.fasterxml.jackson.annotation.JsonAutoDetect; |
|
8 | 7 |
import io.swagger.annotations.ApiModel; |
9 | 8 |
|
10 | 9 |
/** |
... | ... | |
12 | 11 |
*/ |
13 | 12 |
@Entity |
14 | 13 |
@Table(name = "dsm_datasources") |
15 |
@JsonAutoDetect |
|
14 |
//@JsonAutoDetect
|
|
16 | 15 |
@ApiModel(value = "Datasource model", description = "provides datasource details") |
17 | 16 |
public class Datasource { |
18 | 17 |
|
19 | 18 |
@Id |
20 | 19 |
private String id = null; |
21 |
private String officialname = null; //findByOfficialnameContainingOrEnglishnameContaining
|
|
20 |
private String officialname = null; |
|
22 | 21 |
private String englishname = null; |
23 | 22 |
private String websiteurl = null; |
24 | 23 |
private String logourl = null; |
... | ... | |
71 | 70 |
|
72 | 71 |
private Boolean managed; |
73 | 72 |
|
74 |
@OneToMany(mappedBy="datasource", cascade = CascadeType.ALL, fetch = FetchType.EAGER) |
|
73 |
/* |
|
74 |
@JsonIgnore |
|
75 |
@OneToMany(mappedBy = "datasource", cascade = CascadeType.ALL, fetch = FetchType.EAGER) |
|
75 | 76 |
private Set<Api> api = null; |
77 |
*/ |
|
76 | 78 |
|
77 | 79 |
@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER) |
78 | 80 |
@JoinTable( |
... | ... | |
90 | 92 |
inverseJoinColumns = @JoinColumn(name="pid")) |
91 | 93 |
private Set<Identity> identities; |
92 | 94 |
|
95 |
public Datasource() {} |
|
96 |
|
|
93 | 97 |
public String getId() { |
94 | 98 |
return id; |
95 | 99 |
} |
... | ... | |
254 | 258 |
return managed; |
255 | 259 |
} |
256 | 260 |
|
257 |
public Set<Api> getApi() { |
|
258 |
return api; |
|
259 |
} |
|
260 |
|
|
261 | 261 |
public Set<Organization> getOrganizations() { |
262 | 262 |
return organizations; |
263 | 263 |
} |
... | ... | |
471 | 471 |
return this; |
472 | 472 |
} |
473 | 473 |
|
474 |
public Datasource setApi(final Set<Api> api) { |
|
475 |
this.api = api; |
|
476 |
return this; |
|
477 |
} |
|
478 |
|
|
479 | 474 |
public Datasource setOrganizations(final Set<Organization> organizations) { |
480 | 475 |
this.organizations = organizations; |
481 | 476 |
return this; |
Also available in: Unified diff
fine grained operations