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 / ValidationCycleRelation.java
diff --git a/Workspace/Siman-Common/src/org/splat/dal/bo/som/ValidationCycleRelation.java b/Workspace/Siman-Common/src/org/splat/dal/bo/som/ValidationCycleRelation.java
new file mode 100644 (file)
index 0000000..e3c4f15
--- /dev/null
@@ -0,0 +1,54 @@
+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 ValidationCycleRelation extends Relation {
+
+    private  ValidationCycle refer;
+
+//  ==============================================================================================================================
+//  Construction
+//  ==============================================================================================================================
+
+//  Database fetch constructor
+    protected ValidationCycleRelation () {
+    }
+//  Internal constructor
+    protected ValidationCycleRelation (Study from, ValidationCycle to) {
+//  ------------------------------------------------------------------
+      super(from);
+      this.refer  = to;
+    }
+
+//  ==============================================================================================================================
+//  Public member functions
+//  ==============================================================================================================================
+
+/**
+ * Returns the document type to which the validation cycle referenced by this relation applies. If the referenced validation cycle
+ * is a default one, the associated document type is not defined.
+ * 
+ * @return the document type involved by the referenced validation cycle, or null if this latter is a default one.
+ */
+    public DocumentType getDocumentType () {
+//  --------------------------------------
+      return refer.getDocumentType();
+    }
+
+    public ValidationCycle getTo () {
+//  -------------------------------
+      return refer;
+    }
+
+    protected void setTo (Persistent to) {
+//  ------------------------------------
+      refer = (ValidationCycle)to;
+    }
+}
\ No newline at end of file