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
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 Object

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
pack-priv final Object

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 Object

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
,
Object
The collection key (differs from owner-id in the case of property-refs).
collectionKey
,
EventSource
The session from which the request originated.
source
)

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 Object ownerIdentifier

Constructor Detail

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

Method Detail

extractCollectionKeyFromOwnerback to summary
pack-priv final Object 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:Object

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 Object getOwnerIdentifier()

Retrieve the identifier of the entity being visited.

Returns:Object

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, Object collectionKey, EventSource source) throws HibernateException

Schedules a collection for deletion.

Parameters
role:CollectionPersister

The persister representing the collection to be removed.

collectionKey:Object

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

source:EventSource

The session from which the request originated.