Skip to content

Commit

Permalink
Remove unnecessary equals() method override in projection DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
maryamkhan14 committed Feb 21, 2024
1 parent 5bddbf9 commit 8809b11
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
package com.savvato.tribeapp.dto.projections;


import java.util.Objects;

public record PhraseWithUserCountDTO(Long id, Long adverbId, Long verbId, Long prepositionId, Long nounId,
Long userCount) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PhraseWithUserCountDTO phraseWithUserCountDTO = (PhraseWithUserCountDTO) o;
return Objects.equals(id, phraseWithUserCountDTO.id) && Objects.equals(adverbId, phraseWithUserCountDTO.adverbId) && Objects.equals(verbId, phraseWithUserCountDTO.verbId) && Objects.equals(prepositionId, phraseWithUserCountDTO.prepositionId) && Objects.equals(nounId, phraseWithUserCountDTO.nounId);
}
}
}

0 comments on commit 8809b11

Please sign in to comment.