unsetOwner

clone

public java.lang.Object clone()

Creates and returns a copy of this object.

Mutable second-class Objects are required to provide a public
clone method in order to allow for copying PersistenceCapable
objects. In contrast to Object.clone(), this method must not throw a
CloneNotSupportedException.

writeReplace

The writeReplace method is called when ObjectOutputStream is preparing
to write the object to the stream. The ObjectOutputStream checks whether
the class defines the writeReplace method. If the method is defined, the
writeReplace method is called to allow the object to designate its
replacement in the stream. The object returned should be either of the
same type as the object passed in or an object that when read and
resolved will result in an object of a type that is compatible with all
references to the object.