Package ome.tools.hibernate
Class UpdateFilter
- java.lang.Object
-
- ome.util.ContextFilter
-
- ome.tools.hibernate.UpdateFilter
-
- All Implemented Interfaces:
ome.util.Filter
- Direct Known Subclasses:
ReloadFilter
public class UpdateFilter extends ome.util.ContextFilter
responsible for correlating entity identities during multiple calls to merge. This occurs whencollections
or arrays are passed into theUpdateImpl
save methods.- Since:
- 3.0-M3
- See Also:
IUpdate
,UpdateImpl
-
-
Constructor Summary
Constructors Constructor Description UpdateFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
alreadySeen(java.lang.Object o)
java.lang.Object
filter(java.lang.String fieldId, java.lang.Object o)
overridesContextFilter.filter(String, Object)
to allow only certain types to enter the Hibernate systemjava.util.Collection
filter(java.lang.String fieldId, java.util.Collection c)
overridesContextFilter.filter(String, Collection)
to return previously checkedcollections
.java.util.Map
filter(java.lang.String fieldId, java.util.Map m)
Prevents CountPerOwner from being loaded unnecessarily.ome.util.Filterable
filter(java.lang.String fieldId, ome.util.Filterable f)
overridesContextFilter.filter(String, Filterable)
to return previously merged or previously checked items.protected boolean
hasReplacement(java.lang.Object o)
protected java.lang.Object
returnSeen(java.lang.Object o)
void
unloadReplacedObjects()
provides an external hook to unload all files which have already been merged.
-
-
-
Method Detail
-
unloadReplacedObjects
public void unloadReplacedObjects()
provides an external hook to unload all files which have already been merged.Merging produces a copy of an entity, so that all old entities should be considered stale. By unloading them, one is forcing the API user to use the
replacement
instead.The replacement is set by
MergeEventListener
and this is the signal that that entity can be unloaded. Usually, this method is invoked byUpdateImpl
- See Also:
MergeEventListener
,UpdateImpl
,IObject.unload()
-
filter
public java.lang.Object filter(java.lang.String fieldId, java.lang.Object o)
overridesContextFilter.filter(String, Object)
to allow only certain types to enter the Hibernate system- Specified by:
filter
in interfaceome.util.Filter
- Overrides:
filter
in classome.util.ContextFilter
-
filter
public ome.util.Filterable filter(java.lang.String fieldId, ome.util.Filterable f)
overridesContextFilter.filter(String, Filterable)
to return previously merged or previously checked items.- Specified by:
filter
in interfaceome.util.Filter
- Overrides:
filter
in classome.util.ContextFilter
-
filter
public java.util.Collection filter(java.lang.String fieldId, java.util.Collection c)
overridesContextFilter.filter(String, Collection)
to return previously checkedcollections
.- Specified by:
filter
in interfaceome.util.Filter
- Overrides:
filter
in classome.util.ContextFilter
-
filter
public java.util.Map filter(java.lang.String fieldId, java.util.Map m)
Prevents CountPerOwner from being loaded unnecessarily.- Specified by:
filter
in interfaceome.util.Filter
- Overrides:
filter
in classome.util.ContextFilter
- See Also:
- Trac ticket #3978
-
hasReplacement
protected boolean hasReplacement(java.lang.Object o)
-
alreadySeen
protected boolean alreadySeen(java.lang.Object o)
-
returnSeen
protected java.lang.Object returnSeen(java.lang.Object o)
-
-