Class ReviewImpl

java.lang.Object
com.commercetools.api.models.review.ReviewImpl
All Implemented Interfaces:
BaseResource, Customizable<Review>, DomainResource<Review>, Identifiable<Review>, Referencable<Review>, ResourceIdentifiable<Review>, Review, ReviewMixin, Versioned<Review>, WithKey, io.vrap.rmf.base.client.ModelBase

public class ReviewImpl extends Object implements Review, io.vrap.rmf.base.client.ModelBase
Review
  • Constructor Details

    • ReviewImpl

      public ReviewImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Review.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Review>
      Specified by:
      getId in interface Identifiable<Review>
      Specified by:
      getId in interface Review
      Specified by:
      getId in interface Versioned<Review>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Review.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Review>
      Specified by:
      getVersion in interface Review
      Specified by:
      getVersion in interface Versioned<Review>
      Returns:
      version
    • getCreatedAt

      Date and time (UTC) the Review was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface Review
      Returns:
      createdAt
    • getLastModifiedAt

      Date and time (UTC) the Review was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface Review
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface Review
      Returns:
      lastModifiedBy
    • getCreatedBy

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface Review
      Returns:
      createdBy
    • getKey

      public String getKey()

      User-defined unique identifier of the Review.

      Specified by:
      getKey in interface Review
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getUniquenessValue

      Must be unique among Reviews. For example, if this value is set to Customer id + Product id, only one Review per Customer and per Product is allowed.

      Specified by:
      getUniquenessValue in interface Review
      Returns:
      uniquenessValue
    • getLocale

      public String getLocale()

      Language in which the content of the Review is written.

      Specified by:
      getLocale in interface Review
      Returns:
      locale
    • getAuthorName

      Name of the author.

      Specified by:
      getAuthorName in interface Review
      Returns:
      authorName
    • getTitle

      public String getTitle()

      Title of the Review.

      Specified by:
      getTitle in interface Review
      Returns:
      title
    • getText

      public String getText()

      Content of the Review.

      Specified by:
      getText in interface Review
      Returns:
      text
    • getTarget

      public Reference getTarget()

      A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId 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 additional obj field then.

      Specified by:
      getTarget in interface Review
      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.

      Specified by:
      getIncludedInStatistics in interface Review
      Returns:
      includedInStatistics
    • getRating

      public Integer getRating()

      Rating of the Product or Channel.

      Specified by:
      getRating in interface Review
      Returns:
      rating
    • getState

      State of the Review. Used for approval processes, see Review approval process for details.

      Specified by:
      getState in interface Review
      Returns:
      state
    • getCustomer

      Customer who created the Review.

      Specified by:
      getCustomer in interface Review
      Returns:
      customer
    • getCustom

      Custom Fields of the Review.

      Specified by:
      getCustom in interface Customizable<Review>
      Specified by:
      getCustom in interface Review
      Returns:
      custom
    • setId

      public void setId(String id)
      Description copied from interface: Review

      Unique identifier of the Review.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Review
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: Review

      Current version of the Review.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface Review
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: Review

      Date and time (UTC) the Review was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface Review
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: Review

      Date and time (UTC) the Review was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface Review
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: Review

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface Review
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: Review

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface Review
      Parameters:
      createdBy - value to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: Review

      User-defined unique identifier of the Review.

      Specified by:
      setKey in interface Review
      Parameters:
      key - value to be set
    • setUniquenessValue

      public void setUniquenessValue(String uniquenessValue)
      Description copied from interface: Review

      Must be unique among Reviews. For example, if this value is set to Customer id + Product id, only one Review per Customer and per Product is allowed.

      Specified by:
      setUniquenessValue in interface Review
      Parameters:
      uniquenessValue - value to be set
    • setLocale

      public void setLocale(String locale)
      Description copied from interface: Review

      Language in which the content of the Review is written.

      Specified by:
      setLocale in interface Review
      Parameters:
      locale - value to be set
    • setAuthorName

      public void setAuthorName(String authorName)
      Description copied from interface: Review

      Name of the author.

      Specified by:
      setAuthorName in interface Review
      Parameters:
      authorName - value to be set
    • setTitle

      public void setTitle(String title)
      Description copied from interface: Review

      Title of the Review.

      Specified by:
      setTitle in interface Review
      Parameters:
      title - value to be set
    • setText

      public void setText(String text)
      Description copied from interface: Review

      Content of the Review.

      Specified by:
      setText in interface Review
      Parameters:
      text - value to be set
    • setTarget

      public void setTarget(Reference target)
      Description copied from interface: Review

      A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId 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 additional obj field then.

      Specified by:
      setTarget in interface Review
      Parameters:
      target - value to be set
    • setIncludedInStatistics

      public void setIncludedInStatistics(Boolean includedInStatistics)
      Description copied from interface: Review

      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.

      Specified by:
      setIncludedInStatistics in interface Review
      Parameters:
      includedInStatistics - value to be set
    • setRating

      public void setRating(Integer rating)
      Description copied from interface: Review

      Rating of the Product or Channel.

      Specified by:
      setRating in interface Review
      Parameters:
      rating - value to be set
    • setState

      public void setState(StateReference state)
      Description copied from interface: Review

      State of the Review. Used for approval processes, see Review approval process for details.

      Specified by:
      setState in interface Review
      Parameters:
      state - value to be set
    • setCustomer

      public void setCustomer(CustomerReference customer)
      Description copied from interface: Review

      Customer who created the Review.

      Specified by:
      setCustomer in interface Review
      Parameters:
      customer - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Review

      Custom Fields of the Review.

      Specified by:
      setCustom in interface Customizable<Review>
      Specified by:
      setCustom in interface Review
      Parameters:
      custom - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object