Class ProductVariantImportImpl
- All Implemented Interfaces:
ImportResource
,ProductVariantImport
,io.vrap.rmf.base.client.ModelBase
The data representation for a ProductVariant to be imported that is persisted as a ProductVariant in the Project.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Maps toProductVariant.assets
.Maps toProductVariant.attributes
.Maps toProductVariant.images
.Maps toProductVariant.isMasterVariant
.getKey()
User-defined unique identifier.The Product to which this Product Variant belongs.Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.getSku()
Maps toProductVariant.sku
.int
hashCode()
void
Maps toProductVariant.assets
.void
Maps toProductVariant.assets
.void
setAttributes
(Attribute... attributes) Maps toProductVariant.attributes
.void
setAttributes
(List<Attribute> attributes) Maps toProductVariant.attributes
.void
Maps toProductVariant.images
.void
Maps toProductVariant.images
.void
setIsMasterVariant
(Boolean isMasterVariant) Maps toProductVariant.isMasterVariant
.void
User-defined unique identifier.void
setProduct
(ProductKeyReference product) The Product to which this Product Variant belongs.void
setPublish
(Boolean publish) Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.void
Maps toProductVariant.sku
.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.importapi.models.productvariants.ProductVariantImport
withProductVariantImport
-
Constructor Details
-
ProductVariantImportImpl
public ProductVariantImportImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier.
- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getSku
Maps to
ProductVariant.sku
.- Specified by:
getSku
in interfaceProductVariantImport
- Returns:
- sku
-
getIsMasterVariant
Maps to
ProductVariant.isMasterVariant
.- Specified by:
getIsMasterVariant
in interfaceProductVariantImport
- Returns:
- isMasterVariant
-
getAttributes
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Specified by:
getAttributes
in interfaceProductVariantImport
- Returns:
- attributes
-
getImages
Maps to
ProductVariant.images
.- Specified by:
getImages
in interfaceProductVariantImport
- Returns:
- images
-
getAssets
Maps to
ProductVariant.assets
.- Specified by:
getAssets
in interfaceProductVariantImport
- Returns:
- assets
-
getPublish
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Specified by:
getPublish
in interfaceProductVariantImport
- Returns:
- publish
-
getProduct
The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Specified by:
getProduct
in interfaceProductVariantImport
- Returns:
- product
-
setKey
Description copied from interface:ImportResource
User-defined unique identifier.
- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setSku
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.sku
.- Specified by:
setSku
in interfaceProductVariantImport
- Parameters:
sku
- value to be set
-
setIsMasterVariant
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.isMasterVariant
.- Specified by:
setIsMasterVariant
in interfaceProductVariantImport
- Parameters:
isMasterVariant
- value to be set
-
setAttributes
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Specified by:
setAttributes
in interfaceProductVariantImport
- Parameters:
attributes
- values to be set
-
setAttributes
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the project, or thestate
of the ImportOperation will beunresolved
.- Specified by:
setAttributes
in interfaceProductVariantImport
- Parameters:
attributes
- values to be set
-
setImages
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.images
.- Specified by:
setImages
in interfaceProductVariantImport
- Parameters:
images
- values to be set
-
setImages
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.images
.- Specified by:
setImages
in interfaceProductVariantImport
- Parameters:
images
- values to be set
-
setAssets
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.assets
.- Specified by:
setAssets
in interfaceProductVariantImport
- Parameters:
assets
- values to be set
-
setAssets
Description copied from interface:ProductVariantImport
Maps to
ProductVariant.assets
.- Specified by:
setAssets
in interfaceProductVariantImport
- Parameters:
assets
- values to be set
-
setPublish
Description copied from interface:ProductVariantImport
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Specified by:
setPublish
in interfaceProductVariantImport
- Parameters:
publish
- value to be set
-
setProduct
Description copied from interface:ProductVariantImport
The Product to which this Product Variant belongs. Maps to
ProductVariant.product
. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Specified by:
setProduct
in interfaceProductVariantImport
- Parameters:
product
- value to be set
-
equals
-
hashCode
-