Class ContainerValueIdGenerator
java.lang.Object
com.evolveum.midpoint.schema.util.cid.ContainerValueIdGenerator
Generator assigning missing IDs to PCVs of multi-value containers.
Originally internal to "new repo" (sqale), now used also from the lens (clockwork) - when simulating the effect of deltas
on the objects during execution of operations in simulation mode.
-
Constructor Summary
ConstructorDescriptionContainerValueIdGenerator
(@NotNull PrismObject<? extends ObjectType> object) -
Method Summary
Modifier and TypeMethodDescriptionforModifyObject
(long containerIdSeq) Initializes the generator for modify object and checks that no previous CIDs are missing.long
Method inserts IDs for prism container values without IDs and returns highest CID.int
boolean
isOverwrittenId
(Long id) long
void
processModification
(ItemDelta<?, ?> modification) This checks the modification for containers without assigned CIDs and adds them.
-
Constructor Details
-
ContainerValueIdGenerator
-
-
Method Details
-
generateForNewObject
public long generateForNewObject()Method inserts IDs for prism container values without IDs and returns highest CID. This directly changes the object provided as a parameter, if necessary. -
forModifyObject
Initializes the generator for modify object and checks that no previous CIDs are missing. This is a critical step before callingprocessModification(com.evolveum.midpoint.prism.delta.ItemDelta<?, ?>)
. -
processModification
This checks the modification for containers without assigned CIDs and adds them. This changes values inside the modification and this *must be called before the modification is applied to the prism object*. Theoretically, the changes may affect the prism object after the fact, but if any cloning is involved this may not be true, so preferably use this *before* applying the modification. -
getGenerated
public int getGenerated() -
lastUsedId
public long lastUsedId() -
isOverwrittenId
-