From c76354d4e0a704ab2cb140b2da4707a44eadc10a Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 31 Jul 2010 12:54:03 +0000 Subject: [PATCH] --- .../wamblee/persistence/JpaMergeSupport.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/support/general/src/main/java/org/wamblee/persistence/JpaMergeSupport.java b/support/general/src/main/java/org/wamblee/persistence/JpaMergeSupport.java index 5105d767..f82f8255 100644 --- a/support/general/src/main/java/org/wamblee/persistence/JpaMergeSupport.java +++ b/support/general/src/main/java/org/wamblee/persistence/JpaMergeSupport.java @@ -28,6 +28,7 @@ import java.util.logging.Logger; import javax.persistence.EntityManager; +import org.wamblee.general.ObjectElem; import org.wamblee.reflection.ReflectionUtils; /** @@ -284,33 +285,4 @@ public class JpaMergeSupport { processPersistent(mergedValue, persistentValue, aProcessed); } } - - /** - * This class provided an equality operation based on the object reference - * of the wrapped object. This is required because we cannto assume that the - * equals operation has any meaning for different types of persistent - * objects. This allows us to use the standard collection classes for - * detecting cyclic dependences and avoiding recursion. - */ - private static final class ObjectElem { - private Object object; - - public ObjectElem(Object aObject) { - object = aObject; - } - - public boolean equals(Object aObj) { - if (aObj == null) { - return false; - } - if (!(aObj instanceof ObjectElem)) { - return false; - } - return ((ObjectElem) aObj).object == object; - } - - public int hashCode() { - return object.hashCode(); - } - } } -- 2.31.1