C# Class NHibernate.Event.Default.DefaultMergeEventListener

Inheritance: NHibernate.Event.Default.AbstractSaveEventListener, IMergeEventListener
Mostra file Open project: nhibernate/nhibernate-core Class Usage Examples

Public Methods

Method Description
OnMerge ( MergeEvent @event ) : void
OnMerge ( MergeEvent @event, IDictionary copiedAlready ) : void

Protected Methods

Method Description
CascadeAfterSave ( IEventSource source, IEntityPersister persister, object entity, object anything ) : void

Cascade behavior is redefined by this subclass, disable superclass behavior

CascadeBeforeSave ( IEventSource source, IEntityPersister persister, object entity, object anything ) : void

Cascade behavior is redefined by this subclass, disable superclass behavior

CascadeOnMerge ( IEventSource source, IEntityPersister persister, object entity, IDictionary copyCache ) : void

Perform any cascades needed as part of this copy event.

CopyValues ( IEntityPersister persister, object entity, object target, ISessionImplementor source, IDictionary copyCache ) : void
CopyValues ( IEntityPersister persister, object entity, object target, ISessionImplementor source, IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection ) : void
EntityIsDetached ( MergeEvent @event, IDictionary copyCache ) : void
EntityIsPersistent ( MergeEvent @event, IDictionary copyCache ) : void
EntityIsTransient ( MergeEvent @event, IDictionary copyCache ) : void
GetMergeMap ( object anything ) : IDictionary
GetTransientCopyCache ( MergeEvent @event, NHibernate.Event.Default.EventCache copyCache ) : NHibernate.Event.Default.EventCache

Determine which merged entities in the copyCache are transient.

Should this method be on the EventCache class?

InvokeUpdateLifecycle ( object entity, IEntityPersister persister, IEventSource source ) : bool
RetryMergeTransientEntities ( MergeEvent @event, IDictionary transientCopyCache, NHibernate.Event.Default.EventCache copyCache ) : void

Retry merging transient entities

Private Methods

Method Description
ExistsInDatabase ( object entity, IEventSource source, IEntityPersister persister ) : bool
IsVersionChanged ( object entity, IEventSource source, IEntityPersister persister, object target ) : bool
MarkInterceptorDirty ( object entity, object target ) : void
MergeTransientEntity ( object entity, string entityName, object requestedId, IEventSource source, IDictionary copyCache ) : object
SaveTransientEntity ( object entity, string entityName, object requestedId, IEventSource source, IDictionary copyCache ) : void

Method Details

CascadeAfterSave() protected method

Cascade behavior is redefined by this subclass, disable superclass behavior
protected CascadeAfterSave ( IEventSource source, IEntityPersister persister, object entity, object anything ) : void
source IEventSource
persister IEntityPersister
entity object
anything object
return void

CascadeBeforeSave() protected method

Cascade behavior is redefined by this subclass, disable superclass behavior
protected CascadeBeforeSave ( IEventSource source, IEntityPersister persister, object entity, object anything ) : void
source IEventSource
persister IEntityPersister
entity object
anything object
return void

CascadeOnMerge() protected method

Perform any cascades needed as part of this copy event.
protected CascadeOnMerge ( IEventSource source, IEntityPersister persister, object entity, IDictionary copyCache ) : void
source IEventSource The merge event being processed.
persister IEntityPersister The persister of the entity being copied.
entity object The entity being copied.
copyCache IDictionary A cache of already copied instance.
return void

CopyValues() protected method

protected CopyValues ( IEntityPersister persister, object entity, object target, ISessionImplementor source, IDictionary copyCache ) : void
persister IEntityPersister
entity object
target object
source ISessionImplementor
copyCache IDictionary
return void

CopyValues() protected method

protected CopyValues ( IEntityPersister persister, object entity, object target, ISessionImplementor source, IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection ) : void
persister IEntityPersister
entity object
target object
source ISessionImplementor
copyCache IDictionary
foreignKeyDirection NHibernate.Type.ForeignKeyDirection
return void

EntityIsDetached() protected method

protected EntityIsDetached ( MergeEvent @event, IDictionary copyCache ) : void
@event MergeEvent
copyCache IDictionary
return void

EntityIsPersistent() protected method

protected EntityIsPersistent ( MergeEvent @event, IDictionary copyCache ) : void
@event MergeEvent
copyCache IDictionary
return void

EntityIsTransient() protected method

protected EntityIsTransient ( MergeEvent @event, IDictionary copyCache ) : void
@event MergeEvent
copyCache IDictionary
return void

GetMergeMap() protected method

protected GetMergeMap ( object anything ) : IDictionary
anything object
return IDictionary

GetTransientCopyCache() protected method

Determine which merged entities in the copyCache are transient.
Should this method be on the EventCache class?
protected GetTransientCopyCache ( MergeEvent @event, NHibernate.Event.Default.EventCache copyCache ) : NHibernate.Event.Default.EventCache
@event MergeEvent
copyCache NHibernate.Event.Default.EventCache
return NHibernate.Event.Default.EventCache

InvokeUpdateLifecycle() protected method

protected InvokeUpdateLifecycle ( object entity, IEntityPersister persister, IEventSource source ) : bool
entity object
persister IEntityPersister
source IEventSource
return bool

OnMerge() public method

public OnMerge ( MergeEvent @event ) : void
@event MergeEvent
return void

OnMerge() public method

public OnMerge ( MergeEvent @event, IDictionary copiedAlready ) : void
@event MergeEvent
copiedAlready IDictionary
return void

RetryMergeTransientEntities() protected method

Retry merging transient entities
protected RetryMergeTransientEntities ( MergeEvent @event, IDictionary transientCopyCache, NHibernate.Event.Default.EventCache copyCache ) : void
@event MergeEvent
transientCopyCache IDictionary
copyCache NHibernate.Event.Default.EventCache
return void