Interface Review
- All Superinterfaces:
BaseResource,Customizable<Review>,DomainResource<Review>,Identifiable<Review>,Referencable<Review>,ResourceIdentifiable<Review>,ReviewMixin,Versioned<Review>,WithKey
Example to create an instance using the builder pattern
Review review = Review.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.includedInStatistics(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReviewBuilderbuilder()builder factory method for Reviewstatic ReviewBuildercreate builder for Review instancecopyDeep()static Reviewfactory method to create a deep copy of ReviewName of the author.@NotNull ZonedDateTimeDate and time (UTC) the Review was initially created.@Valid CreatedByIDs and references that created the Review.@Valid CustomFieldsCustom Fields of the Review.@Valid CustomerReferenceCustomer who created the Review.@NotNull StringgetId()Unique identifier of the Review.@NotNull BooleanIndicates if this Review is taken into account in the ratings statistics of the target.getKey()User-defined unique identifier of the Review.@NotNull ZonedDateTimeDate and time (UTC) the Review was last updated.@Valid LastModifiedByIDs and references that last modified the Review.Language in which the content of the Review is written.Rating of the Product or Channel.@Valid StateReferencegetState()State of the Review.@Valid ReferenceA Reference represents a loose reference to another resource in the same Project identified by itsid.getText()Content of the Review.getTitle()Title of the Review.Must be unique among Reviews.@NotNull LongCurrent version of the Review.static Reviewof()factory methodstatic Reviewfactory method to create a shallow copy Reviewstatic ReferenceTypeIdvoidsetAuthorName(String authorName) Name of the author.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Review was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Review.voidsetCustom(CustomFields custom) Custom Fields of the Review.voidsetCustomer(CustomerReference customer) Customer who created the Review.voidUnique identifier of the Review.voidsetIncludedInStatistics(Boolean includedInStatistics) Indicates if this Review is taken into account in the ratings statistics of the target.voidUser-defined unique identifier of the Review.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Review was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Review.voidLanguage in which the content of the Review is written.voidRating of the Product or Channel.voidsetState(StateReference state) State of the Review.voidA Reference represents a loose reference to another resource in the same Project identified by itsid.default voidDeprecated.voidContent of the Review.voidTitle of the Review.voidsetUniquenessValue(String uniquenessValue) Must be unique among Reviews.voidsetVersion(Long version) Current version of the Review.static com.fasterxml.jackson.core.type.TypeReference<Review>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithReview(Function<Review, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.review.ReviewMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Review.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Review>- Specified by:
getIdin interfaceIdentifiable<Review>- Specified by:
getIdin interfaceVersioned<Review>- Returns:
- id
-
getVersion
Current version of the Review.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Review>- Specified by:
getVersionin interfaceVersioned<Review>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Review was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Review was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Review.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Review.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the Review.
-
getUniquenessValue
String getUniquenessValue()Must be unique among Reviews. For example, if this value is set to Customer
id+ Productid, only one Review per Customer and per Product is allowed.- Returns:
- uniquenessValue
-
getLocale
String getLocale()Language in which the content of the Review is written.
- Returns:
- locale
-
getAuthorName
String getAuthorName()Name of the author.
- Returns:
- authorName
-
getTitle
String getTitle()Title of the Review.
- Returns:
- title
-
getText
String getText()Content of the Review.
- Returns:
- text
-
getTarget
A Reference represents a loose reference to another resource in the same Project identified by its
id. ThetypeIdindicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additionalobjfield then.- Returns:
- target
-
getIncludedInStatistics
Indicates if this Review is taken into account in the ratings statistics of the target. A Review is per default used in the statistics, unless the Review is in a state that does not have the role
ReviewIncludedInStatistics. If the role of a State is modified after the calculation of this field, the calculation is not updated.- Returns:
- includedInStatistics
-
getRating
Integer getRating()Rating of the Product or Channel.
- Returns:
- rating
-
getState
State of the Review. Used for approval processes, see Review approval process for details.
- Returns:
- state
-
getCustomer
Customer who created the Review.
- Returns:
- customer
-
getCustom
Custom Fields of the Review.
- Specified by:
getCustomin interfaceCustomizable<Review>- Returns:
- custom
-
setId
Unique identifier of the Review.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Review.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Review was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Review was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Review.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Review.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the Review.
- Parameters:
key- value to be set
-
setUniquenessValue
Must be unique among Reviews. For example, if this value is set to Customer
id+ Productid, only one Review per Customer and per Product is allowed.- Parameters:
uniquenessValue- value to be set
-
setLocale
Language in which the content of the Review is written.
- Parameters:
locale- value to be set
-
setAuthorName
Name of the author.
- Parameters:
authorName- value to be set
-
setTitle
Title of the Review.
- Parameters:
title- value to be set
-
setText
Content of the Review.
- Parameters:
text- value to be set
-
setTarget
A Reference represents a loose reference to another resource in the same Project identified by its
id. ThetypeIdindicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additionalobjfield then.- Parameters:
target- value to be set
-
setIncludedInStatistics
Indicates if this Review is taken into account in the ratings statistics of the target. A Review is per default used in the statistics, unless the Review is in a state that does not have the role
ReviewIncludedInStatistics. If the role of a State is modified after the calculation of this field, the calculation is not updated.- Parameters:
includedInStatistics- value to be set
-
setRating
Rating of the Product or Channel.
- Parameters:
rating- value to be set
-
setState
State of the Review. Used for approval processes, see Review approval process for details.
- Parameters:
state- value to be set
-
setCustomer
Customer who created the Review.
- Parameters:
customer- value to be set
-
setCustom
Custom Fields of the Review.
- Specified by:
setCustomin interfaceCustomizable<Review>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of Review
-
of
factory method to create a shallow copy Review- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Review copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Review- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Review- Returns:
- builder
-
builder
create builder for Review instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withReview
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
setTarget
Deprecated. -
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-