Interface AttributeValue


public interface AttributeValue
AttributeValue
Example to create an instance using the builder pattern

     AttributeValue attributeValue = AttributeValue.builder()
             .name("{name}")
             .build()
 
  • Method Details

    • getName

      @NotNull @NotNull String getName()

      Name of the Attribute set.

      Returns:
      name
    • getValue

      @NotNull @NotNull Object getValue()

      Value set for the Attribute determined by the AttributeType:

      • For Enum Type and Localized Enum Type, value is the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects.
      • For Localizable Text Type, value is the LocalizedString object.
      • For Money Type Attributes, value is the Money object.
      • For Set Type Attributes, value is the entire set object.
      • For Nested Type Attributes, value is the list of values of all Attributes of the nested Product.
      • For Reference Type Attributes, value is the Reference object.
      Returns:
      value
    • setName

      void setName(String name)

      Name of the Attribute set.

      Parameters:
      name - value to be set
    • setValue

      void setValue(Object value)

      Value set for the Attribute determined by the AttributeType:

      • For Enum Type and Localized Enum Type, value is the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects.
      • For Localizable Text Type, value is the LocalizedString object.
      • For Money Type Attributes, value is the Money object.
      • For Set Type Attributes, value is the entire set object.
      • For Nested Type Attributes, value is the list of values of all Attributes of the nested Product.
      • For Reference Type Attributes, value is the Reference object.
      Parameters:
      value - value to be set
    • of

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

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

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

      static AttributeValueBuilder builder()
      builder factory method for AttributeValue
      Returns:
      builder
    • builder

      static AttributeValueBuilder builder(AttributeValue template)
      create builder for AttributeValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAttributeValue

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

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