Class VariantProductModelConverter
java.lang.Object
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter
de.hybris.platform.servicelayer.internal.converter.impl.VariantProductModelConverter
- All Implemented Interfaces:
TypeSystemAwareModelConverter,UpdateableModelConverter,ModelConverter,Cloneable
VariantProduct - specific ModelConverter. It's required for VariantProducts to provide the correct type (via
getType). Using the default ItemModelConverter the returned type is recognized as abstract by VariantType, which is
used during the save - action.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter
ItemModelConverter.AttributesToLoad, ItemModelConverter.LoadedAttributeValues, ItemModelConverter.ModelAttributeInfo, ItemModelConverter.ModifiedAttributeValues, ItemModelConverter.RelationTypeAttributeInfo, ItemModelConverter.TypeAttributeInfo, ItemModelConverter.TypeMetaInfo -
Constructor Summary
ConstructorsConstructorDescriptionVariantProductModelConverter(ModelService modelService, I18NService i18nService, CommonI18NService commonI18NService, String type, Class<? extends AbstractItemModel> modelClass, SerializationStrategy serializationStrategy, SourceTransformer sourceTransformer, SelfHealingService selfHealingService) -
Method Summary
Methods inherited from class de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter
addModelModificationListener, afterDetach, afterModification, assembleMetaInfo, beforeAttach, calculateTypeAttributeInfos, clearAttribute, clearLocAttribute, convertModelsToObjects, convertObjectsToModels, create, createContextForExistingModel, createContextForNewModel, createModelAttributeInfo, createModelInstance, createNewItem, equals, exists, fillModel, getAllModelAttributes, getAttributesToReload, getAttributeValue, getCommonI18NService, getComposedType, getConfig, getDefaultType, getDirtyAttributes, getDirtyAttributeValue, getDirtyLocalizedAttributesWithNonDataLocales, getDirtyLocalizedAttributeValue, getDynamicAttributesProvider, getExcluded, getFieldValue, getGetter, getI18nService, getInfo, getInitialModelAttributes, getLocaleProvider, getLocalizedAttributeValue, getLocalizedGetter, getLocalizedSetter, getMandatoryAttributes, getMandatoryAttributesForCreation, getModelClass, getModelService, getPartOfAttributes, getPersistenceSource, getSerializationStrategy, getSetter, getSource, getStdLocale, getTypeFromModelContext, getUniqueAttributes, getWritablePartOfAttributes, hashCode, hasNonDataLocales, init, isConfiguredForLegacyPersistence, isEnumValue, isModified, isModified, isModified, isNew, isNonLazyLoadedAttribute, isReferenceAttribute, isRemoved, isUpToDate, jaloOnlyAttribute, load, mergeNonDataLocales, mergeOldValuesIntoDataLocales, mustConvert, preLoadAttribute, preLoadLocAttribute, readAttributes, readPrefetchSettings, readSingleAttribute, reload, remove, removeModelModificationListener, save, setAttributeLoadError, setAttributeValue, setLocAttributeLoadError, storeAttributes, toString, typeSystemChanged, unloadAttributes
-
Constructor Details
-
VariantProductModelConverter
public VariantProductModelConverter(ModelService modelService, I18NService i18nService, CommonI18NService commonI18NService, String type, Class<? extends AbstractItemModel> modelClass, SerializationStrategy serializationStrategy, SourceTransformer sourceTransformer, SelfHealingService selfHealingService)
-
-
Method Details
-
getType
Returns the exact type of the given model. This method is overridden because it requires some specific handling for VariantProduct. The returned Type would be typically "VariantProduct" (itemType), which is recognized as abstract in the variantType, which will be used later before persisting the object. In such case - ModelServiceException is thrown. The proper solution for VariantProduct is to return variant type of the base product type.- Specified by:
getTypein interfaceModelConverter- Overrides:
getTypein classItemModelConverter
-
getTypeFromBaseProduct
-