Package ome.security.basic
Class MergeEventListener
- java.lang.Object
-
- org.hibernate.event.def.AbstractReassociateEventListener
-
- org.hibernate.event.def.AbstractSaveEventListener
-
- org.hibernate.event.def.DefaultMergeEventListener
-
- org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener
-
- ome.security.basic.MergeEventListener
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.event.MergeEventListener
public class MergeEventListener extends org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener
responsible for responding to merge events. in particular in load/re-loading certain types to make use by clients easier. In general, enforces the detached-graph re-attachment "Commandments" as outlined in TODO. Objects that are transient (no ID) are unchanged; objects that are managed (with ID) are checked for validity (i.e. must have a version); and unloaded/filtered objects and collections are re-filled.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MERGE_EVENT
-
Constructor Summary
Constructors Constructor Description MergeEventListener(CurrentDetails cd, TokenHolder th)
main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyValues(org.hibernate.persister.entity.EntityPersister persister, java.lang.Object entity, java.lang.Object target, org.hibernate.engine.SessionImplementor source, java.util.Map copyCache)
protected void
copyValues(org.hibernate.persister.entity.EntityPersister persister, java.lang.Object entity, java.lang.Object target, org.hibernate.engine.SessionImplementor source, java.util.Map copyCache, org.hibernate.type.ForeignKeyDirection foreignKeyDirection)
protected void
entityIsDetached(org.hibernate.event.MergeEvent event, java.util.Map copyCache)
protected void
entityIsTransient(org.hibernate.event.MergeEvent event, java.util.Map copyCache)
protected void
fillReplacement(org.hibernate.event.MergeEvent event)
void
onMerge(org.hibernate.event.MergeEvent event)
void
onMerge(org.hibernate.event.MergeEvent event, java.util.Map copyCache)
protected void
propagateHiddenValues(ome.model.IObject from, ome.model.IObject to)
-
Methods inherited from class org.hibernate.event.def.DefaultMergeEventListener
cascadeAfterSave, cascadeBeforeSave, cascadeOnMerge, entityIsPersistent, getAssumedUnsaved, getCascadeAction, getMergeMap, getTransientCopyCache, mergeTransientEntity, retryMergeTransientEntities
-
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener
getEntityState, getLoggableName, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, validate, visitCollectionsBeforeSave
-
-
-
-
Field Detail
-
MERGE_EVENT
public static final java.lang.String MERGE_EVENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MergeEventListener
public MergeEventListener(CurrentDetails cd, TokenHolder th)
main constructor. Requires a non-null security system
-
-
Method Detail
-
onMerge
public void onMerge(org.hibernate.event.MergeEvent event) throws org.hibernate.HibernateException
- Specified by:
onMerge
in interfaceorg.hibernate.event.MergeEventListener
- Overrides:
onMerge
in classorg.hibernate.event.def.DefaultMergeEventListener
- Throws:
org.hibernate.HibernateException
-
onMerge
public void onMerge(org.hibernate.event.MergeEvent event, java.util.Map copyCache) throws org.hibernate.HibernateException
- Specified by:
onMerge
in interfaceorg.hibernate.event.MergeEventListener
- Overrides:
onMerge
in classorg.hibernate.event.def.DefaultMergeEventListener
- Throws:
org.hibernate.HibernateException
-
copyValues
protected void copyValues(org.hibernate.persister.entity.EntityPersister persister, java.lang.Object entity, java.lang.Object target, org.hibernate.engine.SessionImplementor source, java.util.Map copyCache)
- Overrides:
copyValues
in classorg.hibernate.event.def.DefaultMergeEventListener
-
copyValues
protected void copyValues(org.hibernate.persister.entity.EntityPersister persister, java.lang.Object entity, java.lang.Object target, org.hibernate.engine.SessionImplementor source, java.util.Map copyCache, org.hibernate.type.ForeignKeyDirection foreignKeyDirection)
- Overrides:
copyValues
in classorg.hibernate.event.def.DefaultMergeEventListener
-
entityIsTransient
protected void entityIsTransient(org.hibernate.event.MergeEvent event, java.util.Map copyCache)
- Overrides:
entityIsTransient
in classorg.springframework.orm.hibernate3.support.IdTransferringMergeEventListener
-
entityIsDetached
protected void entityIsDetached(org.hibernate.event.MergeEvent event, java.util.Map copyCache)
- Overrides:
entityIsDetached
in classorg.hibernate.event.def.DefaultMergeEventListener
-
fillReplacement
protected void fillReplacement(org.hibernate.event.MergeEvent event)
-
propagateHiddenValues
protected void propagateHiddenValues(ome.model.IObject from, ome.model.IObject to)
-
-