Package com.evolveum.midpoint.prism.util
Class ObjectDeltaObject<O extends Objectable>
java.lang.Object
com.evolveum.midpoint.prism.util.ObjectDeltaObject<O>
- All Implemented Interfaces:
AbstractItemDeltaItem<PrismObjectDefinition<O>>
,DebugDumpable
,Serializable
public class ObjectDeltaObject<O extends Objectable>
extends Object
implements AbstractItemDeltaItem<PrismObjectDefinition<O>>
A class defining old object state (before change), delta (change) and new object state (after change). This is a useful
class used to describe how the object has changed or is going to be 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:
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionObjectDeltaObject
(@Nullable PrismObject<O> oldObject, @Nullable ObjectDelta<O> delta, @Nullable PrismObject<O> newObject, @Nullable PrismObjectDefinition<O> explicitDefinition) -
Method Summary
Modifier and TypeMethodDescriptionclone()
debugDump
(int indent) boolean
<IV extends PrismValue,
ID extends ItemDefinition<?>>
ItemDeltaItem<IV,ID> findIdi
(@NotNull ItemPath path, @Nullable DefinitionResolver<PrismObjectDefinition<O>, ID> additionalDefinitionResolver) As #findIdi(ItemPath) but with additional definition resolver that provides definitions for sub-items found.static <O extends Objectable>
ObjectDeltaObject<O>forUnchanged
(@NotNull PrismObject<O> prismObject) @NotNull PrismObject<O>
@NotNull PrismObjectDefinition<O>
The definition of the item/object in question.@Nullable PrismObject<O>
@NotNull PrismObject<O>
@Nullable PrismObject<O>
@NotNull PrismObject<O>
int
hashCode()
boolean
Is the item in question a prism container?boolean
isNull()
Is the IDI empty, i.e.boolean
Is the item in question a prism property?boolean
Is the item in question a structured property -Structured
? I.e.normalizeValuesToDelete
(boolean doClone) void
Recomputes the new state of the IDI.void
recomputeIfNeeded
(boolean deep) toString()
void
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.prism.util.AbstractItemDeltaItem
findIdi
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Constructor Details
-
ObjectDeltaObject
public ObjectDeltaObject(@Nullable @Nullable PrismObject<O> oldObject, @Nullable @Nullable ObjectDelta<O> delta, @Nullable @Nullable PrismObject<O> newObject, @Nullable @Nullable PrismObjectDefinition<O> explicitDefinition)
-
-
Method Details
-
forUnchanged
public static <O extends Objectable> ObjectDeltaObject<O> forUnchanged(@NotNull @NotNull PrismObject<O> prismObject) -
getOldObject
-
getOldObjectRequired
-
getObjectDelta
-
getNewObject
-
getNewObjectRequired
-
update
- Throws:
SchemaException
-
getAnyObject
-
getAnyObjectRequired
-
isNull
public boolean isNull()Description copied from interface:AbstractItemDeltaItem
Is the IDI empty, i.e. is everything null? FIXME the implementation of this method may not be 100% precise. Should be reviewed.- Specified by:
isNull
in interfaceAbstractItemDeltaItem<O extends Objectable>
-
getDefinition
Description copied from interface:AbstractItemDeltaItem
The definition of the item/object in question.- Specified by:
getDefinition
in interfaceAbstractItemDeltaItem<O extends Objectable>
-
isContainer
public boolean isContainer()Description copied from interface:AbstractItemDeltaItem
Is the item in question a prism container?- Specified by:
isContainer
in interfaceAbstractItemDeltaItem<O extends Objectable>
-
isProperty
public boolean isProperty()Description copied from interface:AbstractItemDeltaItem
Is the item in question a prism property?- Specified by:
isProperty
in interfaceAbstractItemDeltaItem<O extends Objectable>
-
isStructuredProperty
public boolean isStructuredProperty()Description copied from interface:AbstractItemDeltaItem
Is the item in question a structured property -Structured
? I.e. a prism property that has visible components. (E.g., aPolyString
.) SeeItemDeltaItem.resolveStructuredProperty(ItemPath, PrismPropertyDefinition)
.- Specified by:
isStructuredProperty
in interfaceAbstractItemDeltaItem<O extends Objectable>
-
findIdi
public <IV extends PrismValue,ID extends ItemDefinition<?>> ItemDeltaItem<IV,ID> findIdi(@NotNull @NotNull ItemPath path, @Nullable @Nullable DefinitionResolver<PrismObjectDefinition<O>, ID> additionalDefinitionResolver) throws SchemaExceptionDescription copied from interface:AbstractItemDeltaItem
As #findIdi(ItemPath) but with additional definition resolver that provides definitions for sub-items found.- Specified by:
findIdi
in interfaceAbstractItemDeltaItem<O extends Objectable>
- Throws:
SchemaException
-
recompute
Description copied from interface:AbstractItemDeltaItem
Recomputes the new state of the IDI.- Specified by:
recompute
in interfaceAbstractItemDeltaItem<O extends Objectable>
- Throws:
SchemaException
-
recomputeIfNeeded
- Throws:
SchemaException
-
equals
-
hashCode
public int hashCode() -
debugDump
- Specified by:
debugDump
in interfaceDebugDumpable
-
toString
-
clone
-
normalizeValuesToDelete
-