added set of research areas to employee domain object
This commit is contained in:
parent
49a33cdfe6
commit
ca79800488
src/main/java/se/su/dsv/scipro
@ -61,6 +61,10 @@ public class Employee extends ProjectTeamMember {
|
||||
@AssociationOverride(name="keywords", joinTable=@JoinTable(name="Employee_Keyword"))
|
||||
private Keywords keywords = new Keywords();
|
||||
|
||||
@ManyToMany
|
||||
@JoinTable(name="employee_researcharea")
|
||||
private Set<ResearchArea> researchAreas = new HashSet<ResearchArea>();
|
||||
|
||||
public Keywords getKeywords() {
|
||||
return keywords;
|
||||
}
|
||||
@ -114,7 +118,15 @@ public class Employee extends ProjectTeamMember {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -2570983581219033271L;
|
||||
public void setResearchAreas(Set<ResearchArea> researchAreas) {
|
||||
this.researchAreas = researchAreas;
|
||||
}
|
||||
|
||||
public Set<ResearchArea> getResearchAreas() {
|
||||
return researchAreas;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -2570983581219033271L;
|
||||
@Embeddable
|
||||
public static class Capabilities implements Serializable {
|
||||
|
||||
|
@ -563,7 +563,7 @@ public class ImporterFacade {
|
||||
private void addResearchAreaToUser(User user, ResearchArea area) {
|
||||
Employee supervisor = supervisorDao.getFrom(user);
|
||||
logger.info("Adding research area: " + area.getTitle() + " to supervisor " + supervisor.getUser().getFullName());
|
||||
//supervisor.getKeywords().getAll().add(area);
|
||||
supervisor.getResearchAreas().add(area);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
Loading…
x
Reference in New Issue
Block a user