Interface Review

All Superinterfaces:
BaseResource, Customizable<Review>, DomainResource<Review>, Identifiable<Review>, Referencable<Review>, ResourceIdentifiable<Review>, ReviewMixin, Versioned<Review>, WithKey

Review
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 Details

    • getId

      @NotNull @NotNull 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 Versioned<Review>
      Returns:
      id
    • getVersion

      @NotNull @NotNull 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 Versioned<Review>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

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

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

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

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

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

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the Review.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the Review.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of the Review.

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

      String 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.

      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

      @Valid @Valid 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.

      Returns:
      target
    • getIncludedInStatistics

      @NotNull @NotNull Boolean 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

      @Valid @Valid StateReference getState()

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

      Returns:
      state
    • getCustomer

      @Valid @Valid CustomerReference getCustomer()

      Customer who created the Review.

      Returns:
      customer
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the Review.

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

      void setId(String id)

      Unique identifier of the Review.

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

      void setVersion(Long version)

      Current version of the Review.

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

      void setCreatedAt(ZonedDateTime createdAt)

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

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

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

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

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

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the Review.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the Review.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Review.

      Parameters:
      key - value to be set
    • setUniquenessValue

      void setUniquenessValue(String uniquenessValue)

      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.

      Parameters:
      uniquenessValue - value to be set
    • setLocale

      void setLocale(String locale)

      Language in which the content of the Review is written.

      Parameters:
      locale - value to be set
    • setAuthorName

      void setAuthorName(String authorName)

      Name of the author.

      Parameters:
      authorName - value to be set
    • setTitle

      void setTitle(String title)

      Title of the Review.

      Parameters:
      title - value to be set
    • setText

      void setText(String text)

      Content of the Review.

      Parameters:
      text - value to be set
    • setTarget

      void setTarget(Reference target)

      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.

      Parameters:
      target - value to be set
    • setIncludedInStatistics

      void setIncludedInStatistics(Boolean 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
    • setRating

      void setRating(Integer rating)

      Rating of the Product or Channel.

      Parameters:
      rating - value to be set
    • setState

      void setState(StateReference state)

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

      Parameters:
      state - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      Customer who created the Review.

      Parameters:
      customer - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the Review.

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

      static Review of()
      factory method
      Returns:
      instance of Review
    • of

      static Review of(Review template)
      factory method to create a shallow copy Review
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Review deepCopy(@Nullable Review template)
      factory method to create a deep copy of Review
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ReviewBuilder builder()
      builder factory method for Review
      Returns:
      builder
    • builder

      static ReviewBuilder builder(Review template)
      create builder for Review instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReview

      default <T> T withReview(Function<Review,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • setTarget

      @Deprecated default void setTarget(Object target)
      Deprecated.
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Review> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference