Class CollectionRemoveAction

    • Constructor Detail

      • CollectionRemoveAction

        public CollectionRemoveAction​(PersistentCollection<?> collection,
                                      CollectionPersister persister,
                                      Object id,
                                      boolean emptySnapshot,
                                      EventSource session)
        Removes a persistent collection from its loaded owner.

        Use this constructor when the collection is non-null.

        Parameters:
        collection - The collection to remove; must be non-null
        persister - The collection's persister
        id - The collection key
        emptySnapshot - Indicates if the snapshot is empty
        session - The session
        Throws:
        AssertionFailure - if collection is null.
      • CollectionRemoveAction

        public CollectionRemoveAction​(Object affectedOwner,
                                      CollectionPersister persister,
                                      Object id,
                                      boolean emptySnapshot,
                                      EventSource session)
        Removes a persistent collection from a specified owner.

        Use this constructor when the collection to be removed has not been loaded.

        Parameters:
        affectedOwner - The collection's owner; must be non-null
        persister - The collection's persister
        id - The collection key
        emptySnapshot - Indicates if the snapshot is empty
        session - The session
        Throws:
        AssertionFailure - if affectedOwner is null.
      • CollectionRemoveAction

        public CollectionRemoveAction​(CollectionPersister persister,
                                      Object id,
                                      EventSource session)
        Removes a persistent collection for an unloaded proxy.

        Use this constructor when the owning entity is has not been loaded.

        Parameters:
        persister - The collection's persister
        id - The collection key
        session - The session