org.apache.ojb.otm.copy
Class NoOpObjectCopyStrategy

java.lang.Object
  extended byorg.apache.ojb.otm.copy.NoOpObjectCopyStrategy
All Implemented Interfaces:
ObjectCopyStrategy

public class NoOpObjectCopyStrategy
extends java.lang.Object
implements ObjectCopyStrategy

The NoOpObjectCopyStrategy does not make a copy. It merely returns the same object. For backwards compatability with OJB 0.9, we include a way to no-op copy the object into the transactional context. This means that we are operating on a live object, and can potentially mess stuff up. This is essentially supporting a uncommitted-read only strategy.

Author:
matthew.baird

Constructor Summary
NoOpObjectCopyStrategy()
           
 
Method Summary
 java.lang.Object copy(java.lang.Object obj)
          Make a copy of the given object
 java.lang.Object copy(java.lang.Object src, java.lang.Object dest)
          copy src object into dest object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOpObjectCopyStrategy

public NoOpObjectCopyStrategy()
Method Detail

copy

public java.lang.Object copy(java.lang.Object obj)
                      throws ObjectCopyException
Description copied from interface: ObjectCopyStrategy
Make a copy of the given object

Specified by:
copy in interface ObjectCopyStrategy
Parameters:
obj - object to be copied
Returns:
Object the copy of the object
Throws:
ObjectCopyException
See Also:
ObjectCopyStrategy.copy(Object)

copy

public java.lang.Object copy(java.lang.Object src,
                             java.lang.Object dest)
Description copied from interface: ObjectCopyStrategy
copy src object into dest object

Specified by:
copy in interface ObjectCopyStrategy
Parameters:
src -
dest -
Returns:


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14