From: Antti Villberg Date: Sun, 7 May 2017 06:49:13 +0000 (+0300) Subject: SingletonRead base class X-Git-Tag: v1.29.0~70^2~2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F492%2F1;p=simantics%2Fplatform.git SingletonRead base class refs #7196 Change-Id: Ib7751212d5cad181c74a1680962e4c84a43e4ebb --- diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java new file mode 100644 index 000000000..b24e856e7 --- /dev/null +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingletonRead.java @@ -0,0 +1,16 @@ +package org.simantics.db.common.request; + +public abstract class SingletonRead extends GenericReadBase2 { + + @Override + public boolean equals(Object arg0) { + if(arg0 == this) return true; + return getClass().equals(arg0.getClass()); + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } + +}