org.apache.ojb.otm.swizzle
Class CopySwizzling
java.lang.Object
org.apache.ojb.otm.swizzle.CopySwizzling
- All Implemented Interfaces:
- Swizzling
public class CopySwizzling
- extends Object
- implements Swizzling
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopySwizzling
public CopySwizzling()
swizzle
public Object swizzle(Object newObj,
Object oldObj,
PersistenceBroker pb,
ObjectCache cache)
- Description copied from interface:
Swizzling
- Swizzle object references.
- Specified by:
swizzle in interface Swizzling
- Parameters:
newObj - the object being inserted into the EditingContext,
is null if the object is being invalidatedoldObj - the object present in the EditingContext,
is null if no object is presentpb - the PersistenceBroker that is used to get
persistent class infocache - the "cache" of old objects, only lookup() method
can be used by the Swizzling implementation to seek for old objects
that should be set as a new value of relations.
- Returns:
- the Swizzled Object
- See Also:
Swizzling.swizzle(Object, Object, PersistenceBroker, ObjectCache)
isSameInstance
public boolean isSameInstance(Object swizzledObject,
Object object)
- Description copied from interface:
Swizzling
- Test if the given swizzled object is the same as the given object. By same object we mean,
that the System.identityHashCode() of the given object is the same as that of the object
represented by the swizzled object.
- Specified by:
isSameInstance in interface Swizzling
- Parameters:
swizzledObject - The swizzled objectobject - The other object to be compared to
- Returns:
- true, if they are the same. false, otherwise.
- See Also:
Swizzling.isSameInstance(Object, Object)
getRealTarget
public Object getRealTarget(Object swizzledObject)
- Description copied from interface:
Swizzling
- Get the real object associated with the given swizzled object.
- Specified by:
getRealTarget in interface Swizzling
- Parameters:
swizzledObject - the swizzled object
- Returns:
- the real object
- See Also:
Swizzling.getRealTarget(Object)
Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.