Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in domain classes #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/org/pongmatcher/domain/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
@Table(name = "`match`")
public final class Match {
@Id
private volatile String id;
private String id;

@JsonProperty("match_request_1_id")
private volatile String matchRequest1Id;
private String matchRequest1Id;

@JsonProperty("match_request_2_id")
private volatile String matchRequest2Id;
private String matchRequest2Id;

Match() {
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/pongmatcher/domain/MatchRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public final class MatchRequest {

@GeneratedValue
@Id
private volatile Long id;
private Long id;

private volatile String uuid;
private String uuid;

private volatile String requesterId;
private String requesterId;

MatchRequest() {
}
Expand Down
21 changes: 11 additions & 10 deletions src/main/java/org/pongmatcher/domain/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,37 @@
public final class Result {

@Id
private volatile String id = UUID.randomUUID().toString();
private String id = UUID.randomUUID().toString();

private volatile String winnerId;
@JsonProperty("winner")
private String winnerId;

private volatile String loserId;
@JsonProperty("loser")
private String loserId;

private volatile String matchId;
@JsonProperty("match_id")
private String matchId;

Result() {
}

public Result(@JsonProperty("winner") String winnerId,
@JsonProperty("loser") String loserId,
@JsonProperty("match_id") String matchId) {
public Result(String winnerId,
String loserId,
String matchId) {
this.winnerId = winnerId;
this.loserId = loserId;
this.matchId = matchId;
}

@JsonProperty("winner")

public String getWinnerId() {
return winnerId;
}

@JsonProperty("loser")
public String getLoserId() {
return loserId;
}

@JsonProperty("match_id")
public String getMatchId() {
return matchId;
}
Expand Down