public Object copy ( Object obj , PersistenceBroker broker ) throws ObjectCopyException { if ( obj instanceof OjbCloneable ) { try { return ( ( OjbCloneable ) obj ) . ojbClone ( ) ; } catch ( Exception e ) { throw new ObjectCopyException ( e ) ; } } else { throw new ObjectCopyException ( "Object must implement OjbCloneable in order to use the" + " CloneableObjectCopyStrategy" ) ; } }
If users want to implement clone on all their objects we can use this to make copies . This is hazardous as user may mess it up but it is also potentially the fastest way of making a copy .