Project

General

Profile

1
package eu.dnetlib.datasource.publisher.model.db;
2

    
3
import java.sql.Date;
4
import javax.persistence.Column;
5
import javax.persistence.Entity;
6
import javax.persistence.Id;
7
import javax.persistence.Table;
8

    
9
import com.fasterxml.jackson.annotation.JsonAutoDetect;
10
import io.swagger.annotations.ApiModel;
11

    
12
/**
13
 * Created by claudio on 13/04/2017.
14
 */
15
@Entity
16
@Table(name = "search_api")
17
@ApiModel
18
@JsonAutoDetect
19
public class SearchInterfacesEntry implements Comparable<SearchInterfacesEntry> {
20

    
21
	@Id
22
	private String id;
23

    
24
	@Column(name = "compatibility")
25
	private String compliance;
26

    
27
	@Column(name = "protocol")
28
	private String protocol;
29

    
30
	@Column(name = "active")
31
	private boolean active;
32

    
33
	@Column(name = "repoid")
34
	private String repoid = "unknown";
35

    
36
	@Column(name = "officialname")
37
	private String repoName = "unknown";
38

    
39
	@Column(name = "englishname")
40
	private String alternativeName = "unknown";
41

    
42
	@Column(name = "country")
43
	private String repoCountry = "-";
44

    
45
	@Column(name = "organization")
46
	private String repoOrganization = "-";
47

    
48
	@Column(name = "namespaceprefix", columnDefinition = "bpchar(12)")
49
	private String repoPrefix = "";
50

    
51
	@Column(name = "last_aggregation_date")
52
	private Date aggrDate;
53

    
54
	@Column(name = "last_aggregation_total")
55
	private Integer aggrTotal = 0;
56

    
57
	public SearchInterfacesEntry() {}
58

    
59
	@Override
60
	public int compareTo(final SearchInterfacesEntry e) {
61
		return compliance.compareTo(e.getCompliance());
62
	}
63

    
64
	public String getId() {
65
		return id;
66
	}
67

    
68
	public String getCompliance() {
69
		return compliance;
70
	}
71

    
72
	public String getProtocol() {
73
		return protocol;
74
	}
75

    
76
	public boolean isActive() {
77
		return active;
78
	}
79

    
80
	public String getRepoid() {
81
		return repoid;
82
	}
83

    
84
	public String getRepoName() {
85
		return repoName;
86
	}
87

    
88
	public String getAlternativeName() {
89
		return alternativeName;
90
	}
91

    
92
	public String getRepoCountry() {
93
		return repoCountry;
94
	}
95

    
96
	public String getRepoOrganization() {
97
		return repoOrganization;
98
	}
99

    
100
	public String getRepoPrefix() {
101
		return repoPrefix;
102
	}
103

    
104
	public Date getAggrDate() {
105
		return aggrDate;
106
	}
107

    
108
	public Integer getAggrTotal() {
109
		return aggrTotal;
110
	}
111

    
112
	public SearchInterfacesEntry setId(final String id) {
113
		this.id = id;
114
		return this;
115
	}
116

    
117
	public SearchInterfacesEntry setCompliance(final String compliance) {
118
		this.compliance = compliance;
119
		return this;
120
	}
121

    
122
	public SearchInterfacesEntry setProtocol(final String protocol) {
123
		this.protocol = protocol;
124
		return this;
125
	}
126

    
127
	public SearchInterfacesEntry setActive(final boolean active) {
128
		this.active = active;
129
		return this;
130
	}
131

    
132
	public SearchInterfacesEntry setRepoid(final String repoid) {
133
		this.repoid = repoid;
134
		return this;
135
	}
136

    
137
	public SearchInterfacesEntry setRepoName(final String repoName) {
138
		this.repoName = repoName;
139
		return this;
140
	}
141

    
142
	public SearchInterfacesEntry setAlternativeName(final String alternativeName) {
143
		this.alternativeName = alternativeName;
144
		return this;
145
	}
146

    
147
	public SearchInterfacesEntry setRepoCountry(final String repoCountry) {
148
		this.repoCountry = repoCountry;
149
		return this;
150
	}
151

    
152
	public SearchInterfacesEntry setRepoOrganization(final String repoOrganization) {
153
		this.repoOrganization = repoOrganization;
154
		return this;
155
	}
156

    
157
	public SearchInterfacesEntry setRepoPrefix(final String repoPrefix) {
158
		this.repoPrefix = repoPrefix;
159
		return this;
160
	}
161

    
162
	public SearchInterfacesEntry setAggrDate(final Date aggrDate) {
163
		this.aggrDate = aggrDate;
164
		return this;
165
	}
166

    
167
	public SearchInterfacesEntry setAggrTotal(final Integer aggrTotal) {
168
		this.aggrTotal = aggrTotal;
169
		return this;
170
	}
171

    
172
}
(7-7/7)