Class Variant
java.lang.Object
com.broadleafcommerce.dataexchange.domain.AbstractExchangeObject
com.broadleafcommerce.dataexchange.domain.EntityExchangeObject
com.broadleafcommerce.dataexchange.domain.product.Variant
- All Implemented Interfaces:
ExchangeObject,Translatable,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanReturns the entity type that this object represents at the service layer.getName()getSku()getUpc()inthashCode()booleanvoidsetExternalId(String externalId) voidvoidsetNewlyCreated(boolean newlyCreated) Set to true if the object is newly created.voidsetProductId(String productId) voidsetProductTags(List<ProductTag> productTags) voidvoidsetTranslations(List<Translation> translations) voidtoString()Methods inherited from class com.broadleafcommerce.dataexchange.domain.EntityExchangeObject
getId, setIdMethods inherited from class com.broadleafcommerce.dataexchange.domain.AbstractExchangeObject
getCorrelationId, getCustomProperties, getParentCorrelationId, setCorrelationId, setCustomProperties, setCustomProperty, setParentCorrelationIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.dataexchange.domain.ExchangeObject
getContextState, setContextState
-
Constructor Details
-
Variant
public Variant()
-
-
Method Details
-
getEntityType
Description copied from interface:TranslatableReturns the entity type that this object represents at the service layer. This should be set withTranslation.setEntityType(String)before persistence.For example, this would be "com.broadleafcommerce.catalog.provider.jpa.domain.product.JpaVariant" for a variant entity. It is also acceptable to set this to the extended entity type.
- Specified by:
getEntityTypein interfaceTranslatable- Returns:
- the entity type
-
equals
- Overrides:
equalsin classEntityExchangeObject
-
canEqual
- Overrides:
canEqualin classEntityExchangeObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classEntityExchangeObject
-
isNewlyCreated
public boolean isNewlyCreated()- Specified by:
isNewlyCreatedin interfaceExchangeObject- Overrides:
isNewlyCreatedin classEntityExchangeObject- Returns:
- true if the object is newly created. Note that this is not always applicable to all objects.
-
getSku
-
getUpc
-
getExternalId
-
getProductId
-
getName
-
getTranslations
- Specified by:
getTranslationsin interfaceTranslatable
-
getProductTags
-
setNewlyCreated
public void setNewlyCreated(boolean newlyCreated) Description copied from interface:ExchangeObjectSet to true if the object is newly created. This may not be applicable to all objects.- Specified by:
setNewlyCreatedin interfaceExchangeObject- Overrides:
setNewlyCreatedin classEntityExchangeObject- Parameters:
newlyCreated- true if the object is newly created
-
setSku
-
setUpc
-
setExternalId
-
setProductId
-
setName
-
setTranslations
- Specified by:
setTranslationsin interfaceTranslatable
-
setProductTags
-
toString
- Overrides:
toStringin classEntityExchangeObject
-