Interface ProductTypeImport

All Superinterfaces:
ImportResource

public interface ProductTypeImport extends ImportResource

The data representation for a ProductType to be imported that is persisted as a ProductType in the Project.


Example to create an instance using the builder pattern

     ProductTypeImport productTypeImport = ProductTypeImport.builder()
             .key("{key}")
             .name("{name}")
             .description("{description}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If a ProductType with this key exists, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Returns:
      key
    • getName

      @NotNull @NotNull String getName()

      Maps to ProductType.name.

      Returns:
      name
    • getDescription

      @NotNull @NotNull String getDescription()

      Maps to ProductType.description.

      Returns:
      description
    • getAttributes

      @Valid @Valid List<AttributeDefinition> getAttributes()

      The attributes of ProductType.

      Returns:
      attributes
    • setKey

      void setKey(String key)

      User-defined unique identifier. If a ProductType with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setName

      void setName(String name)

      Maps to ProductType.name.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(String description)

      Maps to ProductType.description.

      Parameters:
      description - value to be set
    • setAttributes

      void setAttributes(AttributeDefinition... attributes)

      The attributes of ProductType.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<AttributeDefinition> attributes)

      The attributes of ProductType.

      Parameters:
      attributes - values to be set
    • of

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

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

      factory method to create a deep copy of ProductTypeImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ProductTypeImportBuilder builder()
      builder factory method for ProductTypeImport
      Returns:
      builder
    • builder

      static ProductTypeImportBuilder builder(ProductTypeImport template)
      create builder for ProductTypeImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductTypeImport

      default <T> T withProductTypeImport(Function<ProductTypeImport,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<ProductTypeImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference