Package de.hybris.platform.jalo.type
Class ItemCloneCreator.CopyItem
- java.lang.Object
-
- de.hybris.platform.jalo.type.ItemCloneCreator.CopyItem
-
- Enclosing class:
- ItemCloneCreator
public static class ItemCloneCreator.CopyItem extends java.lang.ObjectWrapper for a single (partOf) item to be copied. It holds both original and copy item. Finally it keeps track of all attributes to be written.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCopyItem(ComposedType targetType, Item original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttribute(AttributeDescriptor ad, java.lang.Object value)protected voidaddPresetAttribute(AttributeDescriptor ad, java.lang.Object translated)ItemgetCopy()Returns the newly created copy ornullif no copy has been created (yet).ItemgetOriginal()Returns the original item to be copied.protected java.util.Collection<ItemCloneCreator.CopyAttribute>getPartOfAttributes()java.util.Collection<ItemCloneCreator.CopyAttribute>getPendingAttributes()Returns all attribute wrappers which have not been marked as consumed.ComposedTypegetTargetType()Returns configured target type.booleanisComplete()Tells whether or not the wrapped item has been copied completely.protected voidsetCopy(Item copy)java.lang.StringtoString()
-
-
-
Constructor Detail
-
CopyItem
protected CopyItem(ComposedType targetType, Item original)
-
-
Method Detail
-
isComplete
public boolean isComplete()
Tells whether or not the wrapped item has been copied completely. If it returnsfalseeither no copy has been created yet or there are attributes left which have not been set upon the newly created copy.
-
getPartOfAttributes
protected java.util.Collection<ItemCloneCreator.CopyAttribute> getPartOfAttributes()
-
getPendingAttributes
public java.util.Collection<ItemCloneCreator.CopyAttribute> getPendingAttributes()
Returns all attribute wrappers which have not been marked as consumed.
-
addAttribute
protected void addAttribute(AttributeDescriptor ad, java.lang.Object value)
-
addPresetAttribute
protected void addPresetAttribute(AttributeDescriptor ad, java.lang.Object translated)
-
getOriginal
public Item getOriginal()
Returns the original item to be copied.
-
getCopy
public Item getCopy()
Returns the newly created copy ornullif no copy has been created (yet).
-
setCopy
protected void setCopy(Item copy)
-
getTargetType
public ComposedType getTargetType()
Returns configured target type. May benull- in that case a default type is being used (usually the source item type).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-