searching projects on head supervisor works now
This commit is contained in:
parent
68e3a44614
commit
ff755e7acd
src/main/java/se/su/dsv/scipro
@ -1,5 +1,6 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import com.mysema.query.annotations.QueryInit;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
@ -51,8 +52,9 @@ public class Project extends DomainObject implements Comparable<Project>, Iconiz
|
||||
@Sort(type=SortType.NATURAL) //Required by hibernate
|
||||
private SortedSet<ProjectFollower> projectFollowers = new TreeSet<ProjectFollower>();
|
||||
|
||||
@ManyToOne
|
||||
@ManyToOne
|
||||
@SortableField
|
||||
@QueryInit({"user"})
|
||||
private Employee headSupervisor;
|
||||
|
||||
@OneToOne(mappedBy="project", orphanRemoval = true)
|
||||
|
@ -126,17 +126,18 @@ public class ProjectServiceImpl extends AbstractQueryService<Project, Long> impl
|
||||
}
|
||||
|
||||
private BooleanExpression titleContains(String searchTerm) {
|
||||
return QProject.project.title.contains(searchTerm);
|
||||
return QProject.project.title.containsIgnoreCase(searchTerm);
|
||||
}
|
||||
|
||||
private BooleanExpression headSupervisorFirstNameContains(String searchTerm){
|
||||
if (QProject.project.headSupervisor.isNotNull()){
|
||||
|
||||
}
|
||||
return QProject.project.headSupervisor.user.firstName.contains(searchTerm);
|
||||
// if (QProject.project.headSupervisor.isNotNull()){
|
||||
//
|
||||
// }
|
||||
return QProject.project.headSupervisor.user.firstName.containsIgnoreCase(searchTerm);
|
||||
}
|
||||
|
||||
private BooleanExpression headSupervisorLastNameContains(String searchTerm){
|
||||
return QProject.project.headSupervisor.user.lastName.contains(searchTerm);
|
||||
return QProject.project.headSupervisor.user.lastName.containsIgnoreCase(searchTerm);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user