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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The date that this review was approved or rejectedThe admin who approved or rejected this rating.Map to capture any additional datacom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
The database ID of the user who authored this rating.The customer nameIf edited, the date this review was editedIf edited, the text of the edited reviewgetId()
The ID of this ratingThe initial rating dateThe original review.Return the Product ID if this rating detail targets aRatingTargetType.PRODUCT
orRatingTargetType.VARIANT
.int
The rating of this reviewThe rating summary.The reason for review rejection.The status of this review, e.g.The title of this reviewReturn the variant ID if this rating detail targets aRatingTargetType.VARIANT
.int
hashCode()
boolean
Is this review from a verified purchase?void
setApproveOrRejectDate
(Instant approveOrRejectDate) The date that this review was approved or rejectedvoid
setApproveOrRejectUser
(String approveOrRejectUser) The admin who approved or rejected this rating.void
setAttributes
(Map<String, String> attributes) Map to capture any additional datavoid
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) void
setCustomerId
(String customerId) The database ID of the user who authored this rating.void
setCustomerName
(String customerName) The customer namevoid
setEditedDate
(Instant editedDate) If edited, the date this review was editedvoid
setEditedReview
(String editedReview) If edited, the text of the edited reviewvoid
The ID of this ratingvoid
setInitialReviewDate
(Instant initialReviewDate) The initial rating datevoid
setOriginalReview
(String originalReview) The original review.void
setRating
(int rating) The rating of this reviewvoid
setRatingSummary
(RatingSummary ratingSummary) The rating summary.void
setRejectReason
(String rejectReason) The reason for review rejection.void
setReviewStatus
(String reviewStatus) The status of this review, e.g.void
setReviewTitle
(String reviewTitle) The title of this reviewvoid
setVerifiedPurchase
(boolean verifiedPurchase) Is this review from a verified purchase?toString()
-
Constructor Details
-
RatingDetail
public RatingDetail()
-
-
Method Details
-
getOwnerIdentifier
- Specified by:
getOwnerIdentifier
in interfacecom.broadleafcommerce.data.tracking.core.policy.Owned
-
getProductId
Return the Product ID if this rating detail targets aRatingTargetType.PRODUCT
orRatingTargetType.VARIANT
. TheratingSummary
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
Return the variant ID if this rating detail targets aRatingTargetType.VARIANT
. TheratingSummary
must be hydrated for this method to return non-null.- Returns:
- The variant ID if this targets a variant, else null.
-
getId
The ID of this rating -
getRating
public int getRating()The rating of this review -
getCustomerId
The database ID of the user who authored this rating. Nullable -
getCustomerName
The customer name -
getInitialReviewDate
The initial rating date -
getEditedDate
If edited, the date this review was edited -
getReviewTitle
The title of this review -
getOriginalReview
The original review. This is what is displayed on the review page -
getEditedReview
If edited, the text of the edited review -
getReviewStatus
The status of this review, e.g. APPROVED, REJECTED. SeeRatingDetailStatus
-
getApproveOrRejectUser
The admin who approved or rejected this rating. -
getApproveOrRejectDate
The date that this review was approved or rejected -
getRatingSummary
The rating summary. By default, only the summary ID is populated. -
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
Map to capture any additional data -
setId
The ID of this rating -
setRating
public void setRating(int rating) The rating of this review -
setCustomerId
The database ID of the user who authored this rating. Nullable -
setCustomerName
The customer name -
setInitialReviewDate
The initial rating date -
setEditedDate
If edited, the date this review was edited -
setReviewTitle
The title of this review -
setOriginalReview
The original review. This is what is displayed on the review page -
setEditedReview
If edited, the text of the edited review -
setReviewStatus
The status of this review, e.g. APPROVED, REJECTED. SeeRatingDetailStatus
-
setApproveOrRejectUser
The admin who approved or rejected this rating. -
setApproveOrRejectDate
The date that this review was approved or rejected -
setRatingSummary
The rating summary. By default, only the summary ID is populated. -
setRejectReason
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
Map to capture any additional data -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-