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 ReviewBuilder
builder()
builder factory method for Reviewstatic ReviewBuilder
create builder for Review instancestatic Review
factory method to create a deep copy of ReviewName of the author.@NotNull ZonedDateTime
Date and time (UTC) the Review was initially created.@Valid CreatedBy
IDs and references that created the Review.@Valid CustomFields
Custom Fields of the Review.@Valid CustomerReference
Customer who created the Review.@NotNull String
getId()
Unique identifier of the Review.@NotNull Boolean
Indicates if this Review is taken into account in the ratings statistics of the target.getKey()
User-defined unique identifier of the Review.@NotNull ZonedDateTime
Date and time (UTC) the Review was last updated.@Valid LastModifiedBy
IDs and references that last modified the Review.Language in which the content of the Review is written.Rating of the Product or Channel.@Valid StateReference
getState()
State of the Review.@Valid Reference
A 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 Long
Current version of the Review.static Review
of()
factory methodstatic Review
factory method to create a shallow copy Reviewstatic ReferenceTypeId
void
setAuthorName
(String authorName) Name of the author.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Review was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Review.void
setCustom
(CustomFields custom) Custom Fields of the Review.void
setCustomer
(CustomerReference customer) Customer who created the Review.void
Unique identifier of the Review.void
setIncludedInStatistics
(Boolean includedInStatistics) Indicates if this Review is taken into account in the ratings statistics of the target.void
User-defined unique identifier of the Review.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Review was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Review.void
Language in which the content of the Review is written.void
Rating of the Product or Channel.void
setState
(StateReference state) State of the Review.void
A Reference represents a loose reference to another resource in the same Project identified by itsid
.default void
Deprecated.void
Content of the Review.void
Title of the Review.void
setUniquenessValue
(String uniquenessValue) Must be unique among Reviews.void
setVersion
(Long version) Current version of the Review.static com.fasterxml.jackson.core.type.TypeReference<Review>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReview
(Function<Review, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.review.ReviewMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Review.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Review>
- Specified by:
getId
in interfaceIdentifiable<Review>
- Specified by:
getId
in interfaceVersioned<Review>
- Returns:
- id
-
getVersion
Current version of the Review.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Review>
- Specified by:
getVersion
in interfaceVersioned<Review>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Review was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Review was last updated.
- Specified by:
getLastModifiedAt
in 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
. ThetypeId
indicates 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 additionalobj
field 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:
getCustom
in interfaceCustomizable<Review>
- Returns:
- custom
-
setId
Unique identifier of the Review.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Review.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the Review was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Review was last updated.
- Specified by:
setLastModifiedAt
in 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
. ThetypeId
indicates 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 additionalobj
field 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:
setCustom
in 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
-
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
-