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
public class ItemModelCollectionAttributePopulator extends AbstractCollectionAttributePopulator
An implementation of anAttributePopulator, that handles collections of items models by adding any new elements that have not been persisted in theItemModels collection for theTypeAttributeDescriptorthat is being populated.
-
-
Constructor Summary
Constructors Constructor Description ItemModelCollectionAttributePopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<java.lang.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, populateAttribute
-
Methods inherited from class de.hybris.platform.inboundservices.persistence.populator.AbstractAttributePopulator
getModelService, isNew, populate, setModelService
-
-
-
-
Method Detail
-
isApplicable
protected boolean isApplicable(TypeAttributeDescriptor attribute, PersistenceContext context)
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 java.util.Collection<java.lang.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)
-
-