Class ReviewBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthorName
(String authorName) Name of the author.build()
builds Review with checking for non-null required valuesbuilds Review without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Review was initially created.IDs and references that created the Review.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Review.custom
(CustomFields custom) Custom Fields of the Review.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the Review.customer
(CustomerReference customer) Customer who created the Review.Customer who created the Review.Name of the author.Date and time (UTC) the Review was initially created.IDs and references that created the Review.Custom Fields of the Review.Customer who created the Review.getId()
Unique identifier of the Review.Indicates if this Review is taken into account in the ratings statistics of the target.getKey()
User-defined unique identifier of the Review.Date and time (UTC) the Review was last updated.IDs and references that last modified the Review.Language in which the content of the Review is written.Rating of the Product or Channel.getState()
State of the Review.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.Current version of the Review.Unique identifier of the Review.includedInStatistics
(Boolean includedInStatistics) Indicates if this Review is taken into account in the ratings statistics of the target.User-defined unique identifier of the Review.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Review was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Review.IDs and references that last modified the Review.Language in which the content of the Review is written.static ReviewBuilder
of()
factory method for an instance of ReviewBuilderstatic ReviewBuilder
create builder for Review instanceRating of the Product or Channel.state
(StateReference state) State of the Review.State of the Review.A Reference represents a loose reference to another resource in the same Project identified by itsid
.target
(Function<ReferenceBuilder, Builder<? extends Reference>> builder) A Reference represents a loose reference to another resource in the same Project identified by itsid
.Content of the Review.Title of the Review.uniquenessValue
(String uniquenessValue) Must be unique among Reviews.Current version of the Review.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Review.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the Review.Customer who created the Review.IDs and references that last modified the Review.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Review.
-
Constructor Details
-
ReviewBuilder
public ReviewBuilder()
-
-
Method Details
-
id
Unique identifier of the Review.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Review.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Review was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Review was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Review.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Review.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Review.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Review.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Review.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Review.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Review.
- Parameters:
key
- value to be set- Returns:
- Builder
-
uniquenessValue
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- Returns:
- Builder
-
locale
Language in which the content of the Review is written.
- Parameters:
locale
- value to be set- Returns:
- Builder
-
authorName
Name of the author.
- Parameters:
authorName
- value to be set- Returns:
- Builder
-
title
Title of the Review.
- Parameters:
title
- value to be set- Returns:
- Builder
-
text
Content of the Review.
- Parameters:
text
- value to be set- Returns:
- Builder
-
target
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- Returns:
- Builder
-
target
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:
builder
- function to build the target value- Returns:
- Builder
-
includedInStatistics
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- Returns:
- Builder
-
rating
Rating of the Product or Channel.
- Parameters:
rating
- value to be set- Returns:
- Builder
-
state
State of the Review. Used for approval processes, see Review approval process for details.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Review. Used for approval processes, see Review approval process for details.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Review. Used for approval processes, see Review approval process for details.
- Parameters:
state
- value to be set- Returns:
- Builder
-
customer
Customer who created the Review.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
Customer who created the Review.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
Customer who created the Review.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
custom
Custom Fields of the Review.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the Review.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the Review.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Review.
- Returns:
- id
-
getVersion
Current version of the Review.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Review was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Review was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Review.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Review.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Review.
- Returns:
- key
-
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
Language in which the content of the Review is written.
- Returns:
- locale
-
getAuthorName
Name of the author.
- Returns:
- authorName
-
getTitle
Title of the Review.
- Returns:
- title
-
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
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.
- Returns:
- custom
-
build
builds Review with checking for non-null required values -
buildUnchecked
builds Review without checking for non-null required values- Returns:
- Review
-
of
factory method for an instance of ReviewBuilder- Returns:
- builder
-
of
create builder for Review instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-