Class RatingRequest

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

public class RatingRequest extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.policy.Owned
Represents the fields from the front end needed for a Customer to submit a rating or review. Corresponds to fields in RatingDetail and RatingSummary.
Author:
Cade Rea (cade-rea)
See Also:
  • Constructor Details

    • RatingRequest

      public RatingRequest()
  • Method Details

    • getOwnerIdentifier

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

      public Integer getRating()
      The rating of this review.
      See Also:
      • RatingDetail.rating
    • getCustomerId

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

      public String getCustomerName()
      The customer name
      See Also:
      • RatingDetail.customerName
    • getReviewTitle

      @Nullable public String getReviewTitle()
      The title of this review
      See Also:
      • RatingDetail.reviewTitle
    • getReview

      @Nullable public String getReview()
      The text of the review.
      See Also:
      • RatingDetail.originalReview
      • RatingDetail.editedReview
    • getRatingTargetId

      public String getRatingTargetId()
      The id of the product or variant that is the subject of this rating.
      See Also:
      • RatingSummary.ratingTargetId
    • getParentTargetId

      @Nullable public String getParentTargetId()
      If a Variant is being rated, this is the id of the parent product to the variant. Null if this rating is for a product.
      See Also:
      • RatingSummary.parentTargetId
    • getRatingTargetType

      @Nullable public String getRatingTargetType()
      The rating target type, such as PRODUCT or VARIANT.
      See Also:
    • getAttributes

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

      public void setRating(Integer rating)
      The rating of this review.
      See Also:
      • RatingDetail.rating
    • setCustomerId

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

      public void setCustomerName(String customerName)
      The customer name
      See Also:
      • RatingDetail.customerName
    • setReviewTitle

      public void setReviewTitle(@Nullable String reviewTitle)
      The title of this review
      See Also:
      • RatingDetail.reviewTitle
    • setReview

      public void setReview(@Nullable String review)
      The text of the review.
      See Also:
      • RatingDetail.originalReview
      • RatingDetail.editedReview
    • setRatingTargetId

      public void setRatingTargetId(String ratingTargetId)
      The id of the product or variant that is the subject of this rating.
      See Also:
      • RatingSummary.ratingTargetId
    • setParentTargetId

      public void setParentTargetId(@Nullable String parentTargetId)
      If a Variant is being rated, this is the id of the parent product to the variant. Null if this rating is for a product.
      See Also:
      • RatingSummary.parentTargetId
    • setRatingTargetType

      public void setRatingTargetType(@Nullable String ratingTargetType)
      The rating target type, such as PRODUCT or VARIANT.
      See Also:
    • 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