Package com.evolveum.midpoint.prism.util
Class ItemDeltaItem<V extends PrismValue,D extends ItemDefinition<?>>
- java.lang.Object
-
- com.evolveum.midpoint.prism.util.ItemDeltaItem<V,D>
-
- All Implemented Interfaces:
DebugDumpable
,Serializable
- Direct Known Subclasses:
ObjectDeltaObject
,Source
public class ItemDeltaItem<V extends PrismValue,D extends ItemDefinition<?>> extends Object implements DebugDumpable, Serializable
A class defining old item state (before change), delta (change) and new item state (after change). This is a useful class used to describe how the item has changed without the need to re-apply the delta several times. The delta can be applied once, and then all the rest of the code will have all the data available. This is mostly just a convenience class that groups those three things together. There is only a very little logic on top of that.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ItemDeltaItem()
ItemDeltaItem(Item<V,D> item)
ItemDeltaItem(Item<V,D> itemOld, ItemDelta<V,D> delta, Item<V,D> itemNew, D definition)
ItemDeltaItem(Item<V,D> item, D definition)
ItemDeltaItem(ItemDeltaItem<V,D> idi)
-
Method Summary
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Method Detail
-
getItemNew
public Item<V,D> getItemNew()
Returns new item that is a result of delta application. May return null if there is no new item. WARNING: Output of this method should be used for preview only. It should NOT be placed into prism structures. Not even cloned. This method may return dummy items or similar items that are not usable. Values in the items should be OK, but they may need cloning.
-
getResidualPath
public ItemPath getResidualPath()
-
setResidualPath
public void setResidualPath(ItemPath residualPath)
-
getResolvePath
public ItemPath getResolvePath()
-
setResolvePath
public void setResolvePath(ItemPath resolvePath)
-
getSubItemDeltas
public Collection<? extends ItemDelta<?,?>> getSubItemDeltas()
-
setSubItemDeltas
public void setSubItemDeltas(Collection<? extends ItemDelta<?,?>> subItemDeltas)
-
isNull
public boolean isNull()
-
getElementName
public QName getElementName()
-
getDefinition
@NotNull public D getDefinition()
-
recompute
public void recompute() throws SchemaException
- Throws:
SchemaException
-
findIdi
public <IV extends PrismValue,ID extends ItemDefinition<?>> ItemDeltaItem<IV,ID> findIdi(@NotNull @NotNull ItemPath path) throws SchemaException
- Throws:
SchemaException
-
findIdi
public <IV extends PrismValue,ID extends ItemDefinition<?>> ItemDeltaItem<IV,ID> findIdi(@NotNull @NotNull ItemPath path, @Nullable @Nullable DefinitionResolver<D,ID> additionalDefinitionResolver) throws SchemaException
- Throws:
SchemaException
-
toDeltaSetTriple
public PrismValueDeltaSetTriple<V> toDeltaSetTriple() throws SchemaException
- Throws:
SchemaException
-
isContainer
public boolean isContainer()
-
isProperty
public boolean isProperty()
-
isStructuredProperty
public boolean isStructuredProperty()
-
resolveStructuredProperty
public <X> ItemDeltaItem<PrismPropertyValue<X>,PrismPropertyDefinition<X>> resolveStructuredProperty(ItemPath resolvePath, PrismPropertyDefinition outputDefinition, PrismContext prismContext)
-
applyDefinition
public void applyDefinition(D def, boolean force) throws SchemaException
- Throws:
SchemaException
-
clone
public ItemDeltaItem<V,D> clone()
-
copyValues
protected void copyValues(ItemDeltaItem<V,D> clone)
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
getSingleValue
public V getSingleValue(boolean old)
-
-