forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReportResult.java
More file actions
116 lines (94 loc) · 2.78 KB
/
Copy pathReportResult.java
File metadata and controls
116 lines (94 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.content;
import org.dspace.core.ReloadableEntity;
import org.dspace.eperson.EPerson;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;
/**
* ReportResult is an entity that stores the results of a Health Report execution.
* It includes the type of report, the value of the result, the executor,
* arguments used for the report, and the last modified date.
*
* @author Milan Majchrak (milan.majchrak at dataquest.sk)
*/
@Entity
@Table(name = "report_result")
public class ReportResult implements ReloadableEntity<Integer> {
@Id
@Column(name = "report_result_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "report_result_id_seq")
@SequenceGenerator(name = "report_result_id_seq", sequenceName = "report_result_id_seq",
allocationSize = 1)
private Integer id;
@Column(name = "type")
private String type;
@Column(name = "value")
private String value;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "executor_id")
private EPerson executor;
@Column(name = "args")
private String args;
@Column(name = "last_modified", columnDefinition = "timestamp with time zone")
@Temporal(TemporalType.TIMESTAMP)
private Date lastModified = new Date();
@Override
public Integer getID() {
return id;
}
public ReportResult() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public EPerson getExecutor() {
return executor;
}
public void setExecutor(EPerson executor) {
this.executor = executor;
}
public String getArgs() {
return args;
}
public void setArgs(String args) {
this.args = args;
}
public Date getLastModified() {
return lastModified;
}
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
}