package nl.vpro.poel.dto;

// TODO: Validator
public class PredictionForm {

    private Long matchId;

    private int homeTeamGoals;

    private int awayTeamGoals;

    private PredictionForm() {}

    public PredictionForm(Long matchId, int homeTeamGoals, int awayTeamGoals) {
        this.matchId = matchId;
        this.homeTeamGoals = homeTeamGoals;
        this.awayTeamGoals = awayTeamGoals;
    }

    public Long getMatchId() {
        return matchId;
    }

    public int getHomeTeamGoals() {
        return homeTeamGoals;
    }

    public int getAwayTeamGoals() {
        return awayTeamGoals;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PredictionForm that = (PredictionForm) o;

        if (homeTeamGoals != that.homeTeamGoals) return false;
        if (awayTeamGoals != that.awayTeamGoals) return false;
        return matchId.equals(that.matchId);

    }

    @Override
    public int hashCode() {
        int result = matchId.hashCode();
        result = 31 * result + homeTeamGoals;
        result = 31 * result + awayTeamGoals;
        return result;
    }
}

@@ -478,61 +478,70 @@
 lic 
-int getHomeTeamGoals() %7B%0A        return homeTeamGoals
+void setMatchId(Long matchId) %7B%0A        this.matchId = matchId
 ;%0A  
@@ -567,12 +567,12 @@
  get
-Away
+Home
 Team
@@ -596,20 +596,20 @@
  return 
-away
+home
 TeamGoal
@@ -626,159 +626,144 @@
     
-@Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) return true
+public void setHomeTeamGoals(int homeTeamGoals) %7B%0A        this.homeTeamGoals = homeTeamGoals
 ;%0A    
+%7D%0A%0A
     
-if (o == null %7C%7C getClass() != o.getClass()) return false;%0A
+public int getAwayTeamGoals() %7B
 %0A   
@@ -771,113 +771,90 @@
     
-P
 re
-dictionForm that = (PredictionForm) o;%0A
+turn awayTeamGoals;
 %0A    
+%7D%0A%0A
     
-if (homeTeamGoals != that.homeTeamGoals) return false;
+public void setAwayTeamGoals(int awayTeamGoals) %7B
 %0A   
@@ -862,12 +862,13 @@
     
-if (
+this.
 away
@@ -881,16 +881,10 @@
 als 
-!
 = 
-that.
 away
@@ -896,234 +896,223 @@
 oals
-) return false;%0A        return matchId.equals(that.matchId);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = matchId.hashCode();%0A        result = 31 * result + homeTeamGoals;%0A        result = 31 * result
+;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22PredictionForm%7B%22 +%0A                %22matchId=%22 + matchId +%0A                %22, homeTeamGoals=%22 + homeTeamGoals +%0A                %22, awayTeamGoals=%22
  + a
@@ -1115,33 +1115,34 @@
  + awayTeamGoals
-;
+ +
 %0A        return 
@@ -1138,21 +1138,19 @@
     
-return result
+        '%7D'
 ;%0A  

Use the setters, Luke!