public class MergeItemPair<I> extends Object
ItemMergingService
Constructor and Description |
---|
MergeItemPair(I containerItem,
I modifiedItem) |
Modifier and Type | Method and Description |
---|---|
I |
getContainerItem()
The matched item instance coming from the container.
|
String |
getMergeType()
The type of merge for this item pair.
|
I |
getModifiedItem()
The matched item instance that was modified (added or updated) and resulted in a merge
needing to occur.
|
boolean |
isNeedSaveContainerItem()
Tells if the container instance (
containerItem ) will need to be saved in order for
the merge performed to be persisted. |
boolean |
isNeedSaveModifiedItem()
Tells if the modified instance (
modifiedItem ) will need to be saved in order for the
merge performed to be persisted. |
void |
setMergeType(String mergeType)
The type of merge for this item pair.
|
void |
setNeedSaveContainerItem(boolean needSaveContainerItem)
Tells if the container instance (
containerItem ) will need to be saved in order for
the merge performed to be persisted. |
void |
setNeedSaveModifiedItem(boolean needSaveModifiedItem)
Tells if the modified instance (
modifiedItem ) will need to be saved in order for the
merge performed to be persisted. |
public I getContainerItem()
modifiedItem
). Specifically, there might be a large, blue T-shirt in the
cart, and the user adds another one. This field would be the former.modifiedItem
public I getModifiedItem()
containerItem
). Specifically, there might be a large, blue T-shirt in the cart,
and the user adds another one. This field would be the latter.public String getMergeType()
DefaultMergingType
values. This merge
type may be determined by an application default (properties) or a product-level
configuration.public boolean isNeedSaveContainerItem()
containerItem
) will need to be saved in order for
the merge performed to be persisted.public boolean isNeedSaveModifiedItem()
modifiedItem
) will need to be saved in order for the
merge performed to be persisted.public void setMergeType(String mergeType)
DefaultMergingType
values. This merge
type may be determined by an application default (properties) or a product-level
configuration.mergeType
- the type of merge that will be used for this item pairpublic void setNeedSaveContainerItem(boolean needSaveContainerItem)
containerItem
) will need to be saved in order for
the merge performed to be persisted.needSaveContainerItem
- whether the container instance needs to be savedpublic void setNeedSaveModifiedItem(boolean needSaveModifiedItem)
modifiedItem
) will need to be saved in order for the
merge performed to be persisted.needSaveModifiedItem
- whether the modified instance needs to be savedCopyright © 2021. All rights reserved.