Ignore:
Timestamp:
02/09/22 15:46:58 (3 years ago)
Author:
Test <matonikolov77@…>
Branches:
main
Children:
8f1b7e9
Parents:
967b414
Message:

Refactored reply repository and discussion repository

Location:
src/main/java/com/wediscussmovies/project/querymodels
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/querymodels/DiscussionLikesQM.java

    r967b414 r6f91f99  
    66
    77@Data
    8 public class DiscussionLikes {
     8public class DiscussionLikesQM {
    99    private Integer discussionId;
    1010    private Long likes;
    1111
    12     public DiscussionLikes(Integer discussionId, Long likes) {
     12    public DiscussionLikesQM(Integer discussionId, Long likes) {
    1313        this.discussionId = discussionId;
    1414        this.likes = likes;
    1515    }
    1616
    17     public DiscussionLikes() {
     17    public DiscussionLikesQM() {
    1818    }
    1919
     
    2222        if (this == o) return true;
    2323        if (o == null || getClass() != o.getClass()) return false;
    24         DiscussionLikes that = (DiscussionLikes) o;
     24        DiscussionLikesQM that = (DiscussionLikesQM) o;
    2525        return Objects.equals(discussionId, that.discussionId) && Objects.equals(likes, that.likes);
    2626    }
  • src/main/java/com/wediscussmovies/project/querymodels/GenreLikesQM.java

    r967b414 r6f91f99  
    33import lombok.Data;
    44
    5 import javax.persistence.Entity;
    6 import javax.persistence.Table;
    7 import java.util.Comparator;
    85import java.util.Objects;
    96
    107@Data
    11 public class GenreLikes {
     8public class GenreLikesQM {
    129    private Integer genreId;
    1310    private String name;
    1411    private Long likes;
    1512
    16     public static Comparator<GenreLikes> sorter = Comparator.comparing(GenreLikes::getLikes).thenComparing(GenreLikes::getName).reversed();
     13    //public static Comparator<GenreLikes> sorter = Comparator.comparing(GenreLikes::getLikes).thenComparing(GenreLikes::getName).reversed();
    1714
    18     public GenreLikes(Integer genreId, String name, Long likes) {
     15    public GenreLikesQM(Integer genreId, String name, Long likes) {
    1916        this.genreId = genreId;
    2017        this.name = name;
     
    2724        if (this == o) return true;
    2825        if (o == null || getClass() != o.getClass()) return false;
    29         GenreLikes that = (GenreLikes) o;
     26        GenreLikesQM that = (GenreLikesQM) o;
    3027        return Objects.equals(genreId, that.genreId);
    3128    }
Note: See TracChangeset for help on using the changeset viewer.