Class ProductCharacteristicValue
- All Implemented Interfaces:
Serializable
ProductCharacteristicValue to a CharacteristicValue primarily for syncing
translations between the domains.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
- Author:
- Julia Lopez-Pozas (jlopezpozas)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe sourceCharacteristicValue.getId()that this current value is derived from, if any.getValue()inthashCode()voidsetSourceCharacteristicValueId(String sourceCharacteristicValueId) The sourceCharacteristicValue.getId()that this current value is derived from, if any.voidvoidsetValueType(String valueType) toString()
-
Constructor Details
-
ProductCharacteristicValue
public ProductCharacteristicValue()
-
-
Method Details
-
getSourceCharacteristicValueId
The source
CharacteristicValue.getId()that this current value is derived from, if any.It's possible that when a
Productis first created, it may not have anyProduct.getCharacteristics()associated to it. Alternatively, it's possible that after aProductis created and has already been assignedProduct.getCharacteristics(), the parentBusinessType.getCharacteristics()may change, and therefore theProduct.getCharacteristics()may be outdated/missing values.In such cases, it is often preferable for the API caller to engage a
synchronization process. Part of this process ensures that for anyProductCharacteristicwhich does not have anyvalues set, thevalueswill be initialized withProductCharacteristicValueinstances copied from thebase values. Because these values are copied directly from the baseCharacteristicValue, we want to also ensure that any translations for the baseCharacteristicValueare applied to theProductCharacteristicValuereplica. The mechanism to achieve this is inProductBaseCharacteristicTranslationPostMapperMember, where any translations tied toCharacteristicValue.getId()are mapped to theProductCharacteristicValue, and the connection between the two is handled viagetSourceCharacteristicValueId(). Note that if a translation is specified directly for theProductCharacteristicValueinstance, it will take precedence over any translation from the baseCharacteristicValue.Thus, this
getSourceCharacteristicValueId()field is primarily relevant for scenarios where theProductCharacteristicValueis directly copied from a value set in the baseCharacteristicValue, and should also inherit translations from that base value. In a scenario where theProductCharacteristicValueis independently created, or overridden/changed from the baseCharacteristicValue,getSourceCharacteristicValueId()naturally does not have much importance, as the translations from the base value will not be applicable to this 'custom-defined' value.As a result, when possible, API callers should prefer to provide the
CharacteristicValue.getId()in this field if this value exactly matches the base value, and you are intending to inherit its translations. Otherwise, it can be left null, in which case thisProductCharacteristicValuewill be disconnected from anyCharacteristicValue, and not participate in any translation inheritance. -
getValue
-
getValueType
-
setSourceCharacteristicValueId
The source
CharacteristicValue.getId()that this current value is derived from, if any.It's possible that when a
Productis first created, it may not have anyProduct.getCharacteristics()associated to it. Alternatively, it's possible that after aProductis created and has already been assignedProduct.getCharacteristics(), the parentBusinessType.getCharacteristics()may change, and therefore theProduct.getCharacteristics()may be outdated/missing values.In such cases, it is often preferable for the API caller to engage a
synchronization process. Part of this process ensures that for anyProductCharacteristicwhich does not have anyvalues set, thevalueswill be initialized withProductCharacteristicValueinstances copied from thebase values. Because these values are copied directly from the baseCharacteristicValue, we want to also ensure that any translations for the baseCharacteristicValueare applied to theProductCharacteristicValuereplica. The mechanism to achieve this is inProductBaseCharacteristicTranslationPostMapperMember, where any translations tied toCharacteristicValue.getId()are mapped to theProductCharacteristicValue, and the connection between the two is handled viagetSourceCharacteristicValueId(). Note that if a translation is specified directly for theProductCharacteristicValueinstance, it will take precedence over any translation from the baseCharacteristicValue.Thus, this
getSourceCharacteristicValueId()field is primarily relevant for scenarios where theProductCharacteristicValueis directly copied from a value set in the baseCharacteristicValue, and should also inherit translations from that base value. In a scenario where theProductCharacteristicValueis independently created, or overridden/changed from the baseCharacteristicValue,getSourceCharacteristicValueId()naturally does not have much importance, as the translations from the base value will not be applicable to this 'custom-defined' value.As a result, when possible, API callers should prefer to provide the
CharacteristicValue.getId()in this field if this value exactly matches the base value, and you are intending to inherit its translations. Otherwise, it can be left null, in which case thisProductCharacteristicValuewill be disconnected from anyCharacteristicValue, and not participate in any translation inheritance. -
setValue
-
setValueType
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-