Skip to content

Commit

Permalink
refactor: place refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoya324 committed Nov 17, 2024
1 parent 2461913 commit 08d97fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/findy/findy_be/place/domain/Place.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,21 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass())
return false;
Place place = (Place)o;

if (id != null && id.equals(place.id)) {
return true;
}

return Objects.equals(title, place.title) &&
Objects.equals(roadAddress, place.roadAddress);
}

@Override
public int hashCode() {
if (id != null) {
return Objects.hash(id);
}

return Objects.hash(title, roadAddress);
}
}

0 comments on commit 08d97fc

Please sign in to comment.