Class ContainerValueIdGenerator


  • public class ContainerValueIdGenerator
    extends Object
    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 Detail

      • ContainerValueIdGenerator

        public ContainerValueIdGenerator​(@NotNull
                                         @NotNull PrismObject<S> object)
    • Method Detail

      • generateForNewObject

        public long generateForNewObject()
                                  throws SchemaException
        Method inserts IDs for prism container values without IDs and returns highest CID. This directly changes the object provided as a parameter, if necessary.
        Throws:
        SchemaException
      • processModification

        public void processModification​(ItemDelta<?,​?> modification)
                                 throws SchemaException
        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.
        Throws:
        SchemaException
      • nextId

        public long nextId()
      • getGenerated

        public int getGenerated()
      • lastUsedId

        public long lastUsedId()
      • isOverwrittenId

        public boolean isOverwrittenId​(Long id)