Class RatingDetail

java.lang.Object
com.broadleafcommerce.ratings.domain.RatingDetail
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.policy.Owned, Serializable

public class RatingDetail extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.policy.Owned
See Also:
  • Constructor Details

    • RatingDetail

      public RatingDetail()
  • Method Details

    • getOwnerIdentifier

      public String getOwnerIdentifier()
      Specified by:
      getOwnerIdentifier in interface com.broadleafcommerce.data.tracking.core.policy.Owned
    • getProductId

      public String getProductId()
      Return the Product ID if this rating detail targets a RatingTargetType.PRODUCT or RatingTargetType.VARIANT. The ratingSummary must be hydrated for this method to return non-null.
      Returns:
      The product ID if this detail targets a product or variant, else null.
    • getVariantId

      public String getVariantId()
      Return the variant ID if this rating detail targets a RatingTargetType.VARIANT. The ratingSummary must be hydrated for this method to return non-null.
      Returns:
      The variant ID if this targets a variant, else null.
    • getId

      public String getId()
      The ID of this rating
    • getRating

      public int getRating()
      The rating of this review
    • getCustomerId

      @Nullable public String getCustomerId()
      The database ID of the user who authored this rating. Nullable
    • getCustomerName

      public String getCustomerName()
      The customer name
    • getInitialReviewDate

      public Instant getInitialReviewDate()
      The initial rating date
    • getEditedDate

      @Nullable public Instant getEditedDate()
      If edited, the date this review was edited
    • getReviewTitle

      @Nullable public String getReviewTitle()
      The title of this review
    • getOriginalReview

      @Nullable public String getOriginalReview()
      The original review. This is what is displayed on the review page
    • getEditedReview

      @Nullable public String getEditedReview()
      If edited, the text of the edited review
    • getReviewStatus

      public String getReviewStatus()
      The status of this review, e.g. APPROVED, REJECTED. See RatingDetailStatus
    • getApproveOrRejectUser

      @Nullable public String getApproveOrRejectUser()
      The admin who approved or rejected this rating.
    • getApproveOrRejectDate

      @Nullable public Instant getApproveOrRejectDate()
      The date that this review was approved or rejected
    • getRatingSummary

      public RatingSummary getRatingSummary()
      The rating summary. By default, only the summary ID is populated.
    • getRejectReason

      @Nullable public String getRejectReason()
      The reason for review rejection. Optional.
    • isVerifiedPurchase

      public boolean isVerifiedPurchase()
      Is this review from a verified purchase?
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
    • getAttributes

      public Map<String,String> getAttributes()
      Map to capture any additional data
    • setId

      public void setId(String id)
      The ID of this rating
    • setRating

      public void setRating(int rating)
      The rating of this review
    • setCustomerId

      public void setCustomerId(@Nullable String customerId)
      The database ID of the user who authored this rating. Nullable
    • setCustomerName

      public void setCustomerName(String customerName)
      The customer name
    • setInitialReviewDate

      public void setInitialReviewDate(Instant initialReviewDate)
      The initial rating date
    • setEditedDate

      public void setEditedDate(@Nullable Instant editedDate)
      If edited, the date this review was edited
    • setReviewTitle

      public void setReviewTitle(@Nullable String reviewTitle)
      The title of this review
    • setOriginalReview

      public void setOriginalReview(@Nullable String originalReview)
      The original review. This is what is displayed on the review page
    • setEditedReview

      public void setEditedReview(@Nullable String editedReview)
      If edited, the text of the edited review
    • setReviewStatus

      public void setReviewStatus(String reviewStatus)
      The status of this review, e.g. APPROVED, REJECTED. See RatingDetailStatus
    • setApproveOrRejectUser

      public void setApproveOrRejectUser(@Nullable String approveOrRejectUser)
      The admin who approved or rejected this rating.
    • setApproveOrRejectDate

      public void setApproveOrRejectDate(@Nullable Instant approveOrRejectDate)
      The date that this review was approved or rejected
    • setRatingSummary

      public void setRatingSummary(RatingSummary ratingSummary)
      The rating summary. By default, only the summary ID is populated.
    • setRejectReason

      public void setRejectReason(@Nullable String rejectReason)
      The reason for review rejection. Optional.
    • setVerifiedPurchase

      public void setVerifiedPurchase(boolean verifiedPurchase)
      Is this review from a verified purchase?
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    • setAttributes

      public void setAttributes(Map<String,String> attributes)
      Map to capture any additional data
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object