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 org.springframework.data.repository.CrudRepository;
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 org.springframework.data.repository.CrudRepository;
import java.util.List;
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 {
}
package java.cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
import cz.fi.muni.pa165.seminar4.group7.secretservice.entity.Report;
package cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
import com.sun.istack.NotNull;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @author Jan Smejkal
......@@ -35,7 +31,11 @@ public class PerformanceEvaluation {
@Setter
private int rating;
public PerformanceEvaluation() {
}
public PerformanceEvaluation(String evaluation){
this.evaluation = evaluation;
}
}
\ No newline at end of file
package cz.fi.muni.pa165.seminar4.group7.secretservice.entity;
import com.sun.istack.NotNull;
import lombok.Getter;
import lombok.Setter;
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.List;
import java.util.Objects;
/**
* @author Jan Smejkal
......@@ -27,14 +23,16 @@ public class Report {
@Setter
private String report;
//onetomany with PerfEval
@OneToMany
@Getter
private List<PerformanceEvaluation> performanceEvaluations = new ArrayList();
@ManyToOne
@Getter
private AgentAssignment agentAssignment;
// @ManyToOne
// @Getter
// private AgentAssignment agentAssignment;
public Report() {
}
public void addPerformanceEvaluation(PerformanceEvaluation 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