Class ItemModelCollectionAttributePopulator
java.lang.Object
de.hybris.platform.inboundservices.persistence.populator.AbstractAttributePopulator
de.hybris.platform.inboundservices.persistence.populator.AbstractCollectionAttributePopulator
de.hybris.platform.inboundservices.persistence.populator.ItemModelCollectionAttributePopulator
- All Implemented Interfaces:
AttributePopulator
An implementation of an
AttributePopulator, that handles collections of items models by adding any
new elements that have not been persisted in the ItemModels collection for the TypeAttributeDescriptor
that is being populated.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<Object>getNewCollection(ItemModel item, TypeAttributeDescriptor collectionAttribute, PersistenceContext context) Get the collection of values from the context to be persistedprotected booleanisApplicable(TypeAttributeDescriptor attribute, PersistenceContext context) Determines whether a specific implementation can provide value for the specified attribute.voidsetContextReferencedItemModelService(ContextReferencedItemModelService contextReferencedItemModelService) Methods inherited from class de.hybris.platform.inboundservices.persistence.populator.AbstractCollectionAttributePopulator
combineAttributeValues, getExistingCollection, populateAttributeMethods inherited from class de.hybris.platform.inboundservices.persistence.populator.AbstractAttributePopulator
getModelService, isNew, populate, setModelService
-
Constructor Details
-
ItemModelCollectionAttributePopulator
public ItemModelCollectionAttributePopulator()
-
-
Method Details
-
isApplicable
Description copied from class:AbstractAttributePopulatorDetermines whether a specific implementation can provide value for the specified attribute.- Specified by:
isApplicablein classAbstractAttributePopulator- Parameters:
attribute- attribute to make the decision about.context- context that may be needed to make the decision.- Returns:
true, if this attribute processor is applicable to the specified attribute and can provide a value for it;false, otherwise.
-
getNewCollection
protected Collection<Object> getNewCollection(ItemModel item, TypeAttributeDescriptor collectionAttribute, PersistenceContext context) Description copied from class:AbstractCollectionAttributePopulatorGet the collection of values from the context to be persisted- Specified by:
getNewCollectionin classAbstractCollectionAttributePopulatorcollectionAttribute- Contains information that describes the attributecontext- Contains the data to persist- Returns:
- Collection of values to persist
-
setContextReferencedItemModelService
public void setContextReferencedItemModelService(ContextReferencedItemModelService contextReferencedItemModelService)
-