Salome HOME
Siman codebase is refactored. Spring beans are introduced in the context.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / UsedByRelation.java
diff --git a/Workspace/Siman-Common/src/org/splat/dal/bo/som/UsedByRelation.java b/Workspace/Siman-Common/src/org/splat/dal/bo/som/UsedByRelation.java
new file mode 100644 (file)
index 0000000..b5dedd1
--- /dev/null
@@ -0,0 +1,58 @@
+package org.splat.dal.bo.som;
+/**
+ * 
+ * @author    Daniel Brunier-Coulin
+ * @copyright OPEN CASCADE 2012
+ */
+
+import org.splat.dal.bo.kernel.Persistent;
+import org.splat.dal.bo.kernel.Relation;
+
+
+public class UsedByRelation extends Relation {
+
+    private Document  refer;
+
+//  ==============================================================================================================================
+//  Constructors
+//  ==============================================================================================================================
+
+//  Database fetch constructor
+    protected UsedByRelation () {
+    }
+//  Initialization constructors
+    protected UsedByRelation (Document from, Document to) {
+//  -----------------------------------------------------
+      super(from);
+      this.refer   = to;
+      this.reverse = new UsesRelation(this, to, from);
+    }
+//  Internal constructor
+    protected UsedByRelation (Relation back, Document from, Document to) {
+//  --------------------------------------------------------------------
+      super(from);
+      this.refer   = to;
+      this.reverse = back;
+    }
+
+//  ==============================================================================================================================
+//  Public member functions
+//  ==============================================================================================================================
+
+    public Class<? extends Relation> getReverseClass () {
+//  ---------------------------------------------------
+      return UsesRelation.class;
+    }
+    public Document getTo () {
+//  -------------------------
+      return refer;
+    }
+    public boolean isBidirectional () {
+//  ---------------------------------
+      return true;
+    }
+    protected void setTo (Persistent to) {
+//  ------------------------------------
+      refer = (Document)to;
+    }
+}
\ No newline at end of file