Top Description Fields Constructors Methods
org.hibernate.event.internal

public abstract Class ReattachVisitor

extends ProxyVisitor
Class Inheritance
Known Direct Subclasses
org.hibernate.event.internal.OnLockVisitor, org.hibernate.event.internal.OnReplicateVisitor, org.hibernate.event.internal.OnUpdateVisitor
Imports
java.io.Serializable, org.hibernate.HibernateException, org.hibernate.action.internal.CollectionRemoveAction, org.hibernate.event.spi.EventSource, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.persister.collection.CollectionPersister, org.hibernate.pretty.MessageHelper, org.hibernate.type.CompositeType, .Type

Abstract superclass of visitors that reattach collections.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private static final CoreMessageLogger
private final Object
private final Serializable

Constructor Summary

AccessConstructor and Description
public
ReattachVisitor(EventSource session, Serializable ownerIdentifier, Object owner)

Deprecated as a consequence of EventSource being deprecated.

Method Summary

Modifier and TypeMethod and Description
pack-priv final Serializable

Returns:

The value from the owner that identifies the grouping into the collection
extractCollectionKeyFromOwner
(CollectionPersister
The persister for the collection role being processed.
role
)

This version is slightly different for say org.hibernate.type.CollectionType#getKeyOfOwner in that here we need to assume that the owner is not yet associated with the session, and thus we cannot rely on the owner's EntityEntry snapshot...

pack-priv final Object

Returns:

The entity.
getOwner
()

Retrieve the entity being visited.

pack-priv final Serializable

Returns:

The entity's identifier.
getOwnerIdentifier
()

Retrieve the identifier of the entity being visited.

pack-priv Object
pack-priv void
removeCollection(CollectionPersister
The persister representing the collection to be removed.
role
,
Serializable
The collection key (differs from owner-id in the case of property-refs).
collectionKey
,
EventSource
The session from which the request originated.
source
)

Deprecated as a consequence of EventSource being deprecated.
Schedules a collection for deletion.
Inherited from org.hibernate.event.internal.ProxyVisitor:
isOwnerUnchangedprocessEntityreattachCollection

Field Detail

LOGback to summary
private static final CoreMessageLogger LOG
ownerback to summary
private final Object owner
ownerIdentifierback to summary
private final Serializable ownerIdentifier

Constructor Detail

ReattachVisitorback to summary
public ReattachVisitor(EventSource session, Serializable ownerIdentifier, Object owner)

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

Method Detail

extractCollectionKeyFromOwnerback to summary
pack-priv final Serializable extractCollectionKeyFromOwner(CollectionPersister role)

This version is slightly different for say org.hibernate.type.CollectionType#getKeyOfOwner in that here we need to assume that the owner is not yet associated with the session, and thus we cannot rely on the owner's EntityEntry snapshot...

Parameters
role:CollectionPersister

The persister for the collection role being processed.

Returns:Serializable

The value from the owner that identifies the grouping into the collection

getOwnerback to summary
pack-priv final Object getOwner()

Retrieve the entity being visited.

Returns:Object

The entity.

getOwnerIdentifierback to summary
pack-priv final Serializable getOwnerIdentifier()

Retrieve the identifier of the entity being visited.

Returns:Serializable

The entity's identifier.

processComponentback to summary
pack-priv Object processComponent(Object component, CompositeType componentType) throws HibernateException

Overrides org.hibernate.event.internal.AbstractVisitor.processComponent.

Doc from org.hibernate.event.internal.AbstractVisitor.processComponent.

Visit a component. Dispatch each property to processValue().

Annotations
@Override
removeCollectionback to summary
pack-priv void removeCollection(CollectionPersister role, Serializable collectionKey, EventSource source) throws HibernateException

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

Schedules a collection for deletion.

Parameters
role:CollectionPersister

The persister representing the collection to be removed.

collectionKey:Serializable

The collection key (differs from owner-id in the case of property-refs).

source:EventSource

The session from which the request originated.