org.apache.ojb.otm.swizzle
Class NoSwizzling

java.lang.Object
  extended by org.apache.ojb.otm.swizzle.NoSwizzling
All Implemented Interfaces:
Swizzling

public class NoSwizzling
extends Object
implements Swizzling


Constructor Summary
NoSwizzling()
           
 
Method Summary
 Object getRealTarget(Object swizzledObject)
          Get the real object associated with the given swizzled object.
 boolean isSameInstance(Object swizzledObject, Object object)
          Test if the given swizzled object is the same as the given object.
 Object swizzle(Object newObj, Object oldObj, PersistenceBroker pb, ObjectCache cache)
          Swizzle object references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoSwizzling

public NoSwizzling()
Method Detail

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 invalidated
oldObj - the object present in the EditingContext, is null if no object is present
pb - the PersistenceBroker that is used to get persistent class info
cache - 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:
org.apache.ojb.otm.swizzle.Swizzling#swizzle(Object, Object, PersistenceBroker)

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 object
object - 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.