This commit is contained in:
@@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@@ -16,6 +17,7 @@ import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
|
||||
import org.yacos.core.conferences.Conference;
|
||||
import org.yacos.core.evaluation.Report;
|
||||
import org.yacos.core.users.User;
|
||||
|
||||
@Entity
|
||||
@@ -71,12 +73,17 @@ public class Article implements Serializable {
|
||||
@OneToMany(targetEntity=Preference.class,mappedBy="article")
|
||||
private Collection<Preference> preferences;
|
||||
|
||||
@OneToMany(targetEntity=Report.class, mappedBy="article", cascade=CascadeType.ALL)
|
||||
private Collection<Report> report;
|
||||
|
||||
|
||||
public enum State {
|
||||
SUMMARY, FINAL , REJECTED, ACCEPTED
|
||||
};
|
||||
private State state;
|
||||
|
||||
|
||||
|
||||
|
||||
public Article() {
|
||||
secondaryAuthors = new ArrayList<String>();
|
||||
}
|
||||
@@ -253,4 +260,13 @@ public class Article implements Serializable {
|
||||
public boolean hasMember(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@OneToMany(targetEntity=Report.class, mappedBy="article", cascade=CascadeType.ALL)
|
||||
public Collection<Report> getReport() {
|
||||
return report;
|
||||
}
|
||||
@OneToMany(targetEntity=Report.class, mappedBy="article", cascade=CascadeType.ALL)
|
||||
public void setReport(Collection<Report> report) {
|
||||
this.report = report;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user