Commit 7e15e11f authored by tbilos's avatar tbilos
Browse files

fix: packages, missing entity, constructors

parent eccbcdd9
Pipeline #122657 waiting for manual action with stage
package java.cz.fi.muni.pa165.seminar4.group7.secretservice.dao; package cz.fi.muni.pa165.seminar4.group7.secretservice.dao;
import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report; import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report;
import org.springframework.data.repository.CrudRepository;
import java.util.List; import java.util.List;
......
package java.cz.fi.muni.pa165.seminar4.group7.secretservice.dao; package cz.fi.muni.pa165.seminar4.group7.secretservice.dao;
import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report; import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report;
import org.springframework.data.repository.CrudRepository;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
......
package java.cz.fi.muni.pa165.seminar4.group7.secretservice.entity; package cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
public class AgentAssignment { public class AgentAssignment {
} }
package java.cz.fi.muni.pa165.seminar4.group7.secretservice.entity; package cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report;
import com.sun.istack.NotNull;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.persistence.*; import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/** /**
* @author Jan Smejkal * @author Jan Smejkal
...@@ -35,7 +31,11 @@ public class PerformanceEvaluation { ...@@ -35,7 +31,11 @@ public class PerformanceEvaluation {
@Setter @Setter
private int rating; private int rating;
public PerformanceEvaluation() {
}
public PerformanceEvaluation(String evaluation){ public PerformanceEvaluation(String evaluation){
this.evaluation = evaluation; this.evaluation = evaluation;
} }
} }
\ No newline at end of file
package cz.fi.muni.pa165.seminar4.group7.secretservice.entity; package cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
import com.sun.istack.NotNull;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.persistence.*; import javax.persistence.*;
import java.cz.fi.muni.pa165.seminar4.group7.secretservice.entity.AgentAssignment;
import java.cz.fi.muni.pa165.seminar4.group7.secretservice.entity.PerformanceEvaluation;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* @author Jan Smejkal * @author Jan Smejkal
...@@ -27,14 +23,16 @@ public class Report { ...@@ -27,14 +23,16 @@ public class Report {
@Setter @Setter
private String report; private String report;
//onetomany with PerfEval
@OneToMany @OneToMany
@Getter @Getter
private List<PerformanceEvaluation> performanceEvaluations = new ArrayList(); private List<PerformanceEvaluation> performanceEvaluations = new ArrayList();
@ManyToOne // @ManyToOne
@Getter // @Getter
private AgentAssignment agentAssignment; // private AgentAssignment agentAssignment;
public Report() {
}
public void addPerformanceEvaluation(PerformanceEvaluation performanceEvaluation) { public void addPerformanceEvaluation(PerformanceEvaluation performanceEvaluation) {
performanceEvaluations.add(performanceEvaluation); performanceEvaluations.add(performanceEvaluation);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment