Package de.hybris.platform.jalo.type
Class ItemCloneCreator.CopyAttribute
- java.lang.Object
-
- de.hybris.platform.jalo.type.ItemCloneCreator.CopyAttribute
-
- Enclosing class:
- ItemCloneCreator
public static class ItemCloneCreator.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(ItemCloneCreator.CopyItem item, AttributeDescriptor ad, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemCloneCreator.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.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)protected voidsetTranslatedValue(java.lang.Object translatedValue)java.lang.StringtoString()
-
-
-
Constructor Detail
-
CopyAttribute
protected CopyAttribute(ItemCloneCreator.CopyItem item, AttributeDescriptor ad, java.lang.Object value)
-
-
Method Detail
-
isPartOf
public boolean isPartOf()
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)
-
getItem
public ItemCloneCreator.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)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-