package com.csci4448.MediaManagementSystem.model.review;

import com.csci4448.MediaManagementSystem.model.user.User;

import javax.persistence.*;

@Entity
@Table(name = "REVIEW")
public class Review {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(nullable = false)
    private int ratingValue;

    @Column(nullable = false)
    private String reviewText;

    @OneToOne
    @JoinColumn(name = "userID")
    private User user;

    public int getID() {
        return id;
    }

    public int getRatingValue() {
        return ratingValue;
    }

    public void setRatingValue(int _ratingValue) {
        if (_ratingValue >= 1 && _ratingValue <= 5)
            ratingValue = _ratingValue;
    }

    public String getReviewText() {
        return reviewText;
    }

    public void setReviewText(String _reviewText) {
        reviewText = _reviewText;
    }

    public User getUser() {
        return user;
    }

    @Override
    public String toString() {
        return "User: " + user.getUsername() + "\nReview: " + reviewText + "\nRating: " + ratingValue + "\n";
    }

}

@@ -474,29 +474,32 @@
 user;%0A%0A    p
-ublic
+rotected
  int getID()
@@ -593,37 +593,40 @@
 ue;%0A    %7D%0A%0A    p
-ublic
+rotected
  void setRatingV
@@ -824,21 +824,24 @@
 %7D%0A%0A    p
-ublic
+rotected
  void se
@@ -920,21 +920,24 @@
 %7D%0A%0A    p
-ublic
+rotected
  User ge

Make some methods in Review class protected for security purposes