Class ItemModelCloneCreator.CopyAttribute
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.model.impl.ItemModelCloneCreator.CopyAttribute
-
- Enclosing class:
- ItemModelCloneCreator
public static class ItemModelCloneCreator.CopyAttribute extends java.lang.ObjectA wrapper for each item attribute to be stored while creating a copy. It hold the original and translated attribute value and keeps track on whether this attribute has been consumed (written) yet or not.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCopyAttribute(ItemModelCloneCreator.CopyItem item, AttributeDescriptorModel attributeDescriptor, java.util.Set<de.hybris.platform.servicelayer.internal.model.impl.ItemModelCloneCreator.ModifiersFlag> modifiers, java.lang.Object value)Creates new copy attribute and initialize attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemModelCloneCreator.CopyItemgetItem()Returns owning item wrapper.java.lang.ObjectgetOriginalValue()Returns the original attribute value.java.lang.StringgetQualifier()Returns attribute qualifier.java.lang.ObjectgetTranslatedValue()Returns translated attribute value.booleanisConsumed()Tells whether the attribute has been consumed yet.booleanisLocalized()Returns whether or not the attribute is marked as partOf.booleanisPartOf()Returns whether or not the attribute is marked as partOf.booleanisRequiredForCreation()Tells whether or not the attribute is required for item creation.booleanisTranslated()Tells whether or not the attribute has been translated yet.protected voidsetConsumed(boolean consumed)Marks wrapper as consumed.protected voidsetTranslatedValue(java.lang.Object translatedValue)Registers translated value.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CopyAttribute
protected CopyAttribute(ItemModelCloneCreator.CopyItem item, AttributeDescriptorModel attributeDescriptor, java.util.Set<de.hybris.platform.servicelayer.internal.model.impl.ItemModelCloneCreator.ModifiersFlag> modifiers, java.lang.Object value)
Creates new copy attribute and initialize attributes
-
-
Method Detail
-
isPartOf
public boolean isPartOf()
Returns whether or not the attribute is marked as partOf.
-
isLocalized
public boolean isLocalized()
Returns whether or not the attribute is marked as partOf.
-
isRequiredForCreation
public boolean isRequiredForCreation()
Tells whether or not the attribute is required for item creation.
-
getTranslatedValue
public java.lang.Object getTranslatedValue()
Returns translated attribute value.- Throws:
java.lang.IllegalStateException- if the attribute has not been translated yet
-
setTranslatedValue
protected void setTranslatedValue(java.lang.Object translatedValue)
Registers translated value.
-
getItem
public ItemModelCloneCreator.CopyItem getItem()
Returns owning item wrapper.
-
getQualifier
public java.lang.String getQualifier()
Returns attribute qualifier.
-
getOriginalValue
public java.lang.Object getOriginalValue()
Returns the original attribute value.
-
isTranslated
public boolean isTranslated()
Tells whether or not the attribute has been translated yet.
-
isConsumed
public boolean isConsumed()
Tells whether the attribute has been consumed yet. Consumed means that the attribute value has been translated and it has been stored in copied item.
-
setConsumed
protected void setConsumed(boolean consumed)
Marks wrapper as consumed.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-