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 boolean
boolean
The sourceCharacteristicValue.getId()
that this current value is derived from, if any.getValue()
int
hashCode()
void
setSourceCharacteristicValueId
(String sourceCharacteristicValueId) The sourceCharacteristicValue.getId()
that this current value is derived from, if any.void
void
setValueType
(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
Product
is first created, it may not have anyProduct.getCharacteristics()
associated to it. Alternatively, it's possible that after aProduct
is 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 anyProductCharacteristic
which does not have anyvalues set
, thevalues
will be initialized withProductCharacteristicValue
instances copied from thebase values
. Because these values are copied directly from the baseCharacteristicValue
, we want to also ensure that any translations for the baseCharacteristicValue
are applied to theProductCharacteristicValue
replica. 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 theProductCharacteristicValue
instance, it will take precedence over any translation from the baseCharacteristicValue
.Thus, this
getSourceCharacteristicValueId()
field is primarily relevant for scenarios where theProductCharacteristicValue
is directly copied from a value set in the baseCharacteristicValue
, and should also inherit translations from that base value. In a scenario where theProductCharacteristicValue
is 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 thisProductCharacteristicValue
will 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
Product
is first created, it may not have anyProduct.getCharacteristics()
associated to it. Alternatively, it's possible that after aProduct
is 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 anyProductCharacteristic
which does not have anyvalues set
, thevalues
will be initialized withProductCharacteristicValue
instances copied from thebase values
. Because these values are copied directly from the baseCharacteristicValue
, we want to also ensure that any translations for the baseCharacteristicValue
are applied to theProductCharacteristicValue
replica. 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 theProductCharacteristicValue
instance, it will take precedence over any translation from the baseCharacteristicValue
.Thus, this
getSourceCharacteristicValueId()
field is primarily relevant for scenarios where theProductCharacteristicValue
is directly copied from a value set in the baseCharacteristicValue
, and should also inherit translations from that base value. In a scenario where theProductCharacteristicValue
is 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 thisProductCharacteristicValue
will be disconnected from anyCharacteristicValue
, and not participate in any translation inheritance. -
setValue
-
setValueType
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-