Added reviewer as a filterable Param to ProjectIdeaDao and its implementation class.
This commit is contained in:
parent
fde55d3944
commit
e1b136ea42
src/main/java/se/su/dsv/scipro/match/dao
@ -43,6 +43,8 @@ public interface ProjectIdeaDao extends Dao<ProjectIdea> {
|
||||
|
||||
private Employee supervisor;
|
||||
|
||||
private Employee reviewer;
|
||||
|
||||
private Student author;
|
||||
|
||||
private Boolean projectCreated;
|
||||
@ -96,6 +98,14 @@ public interface ProjectIdeaDao extends Dao<ProjectIdea> {
|
||||
return supervisor;
|
||||
}
|
||||
|
||||
public void setReviewer(Employee reviewer) {
|
||||
this.reviewer = reviewer;
|
||||
}
|
||||
|
||||
public Employee getReviewer() {
|
||||
return reviewer;
|
||||
}
|
||||
|
||||
public void setAuthor(Student author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ public class ProjectIdeaDaoJPAImp extends AbstractDaoJPAImp<ProjectIdea>
|
||||
.projectCreated(params.isProjectCreated())
|
||||
.author(params.getAuthor())
|
||||
.supervisor(params.getSupervisor())
|
||||
.reviewer(params.getReviewer())
|
||||
.sortAndPaginate(params);
|
||||
}
|
||||
|
||||
@ -154,6 +155,15 @@ public class ProjectIdeaDaoJPAImp extends AbstractDaoJPAImp<ProjectIdea>
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public QuerySet reviewer(Employee reviewer) {
|
||||
if (reviewer != null) {
|
||||
getQuery().combine(
|
||||
new Query().where("_.reviewer = :reviewer")
|
||||
.parameter("reviewer", reviewer));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public QuerySet matchDateAfter(Date matchDateAfter) {
|
||||
if (matchDateAfter != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user