Salome HOME
SIMAN Eclipse workspace first version
[tools/siman.git] / Workspace / SPlat / src / org / splat / som / ActorRelation.java
1 package org.splat.som;
2 /**
3  * Base implementation of actor relations such as Contributor, Reviewer and Approver.
4  * ActorRelation objects are attached to Documents for defining those who HAVE CONTRIBUTED to these documents,
5  * while instances of subclasses of ActorRelation are attached to Studies for setting those who CAN CONTRIBUTE to given document types.</br>
6  * </br>
7  * Depending on the actual relation object, the value of the actor relation has different meaning:
8  * <ul>
9  * <li>The description of ActorRelation objects defines the type of contributions (Contributor, Reviewer, Approver...)</li>
10  * <li>The description of instances of subclasses of ActorRelation defines the type of acting documents</li>
11  * </ul>
12  * 
13  * @author    Daniel Brunier-Coulin
14  * @copyright OPEN CASCADE 2012
15  */
16
17 import org.splat.kernel.Persistent;
18 import org.splat.kernel.Relation;
19 import org.splat.kernel.User;
20
21
22 public abstract class ActorRelation extends Relation {
23
24     private User  refer;
25
26 //  ==============================================================================================================================
27 //  Constructors
28 //  ==============================================================================================================================
29
30 //  Database fetch constructor
31     protected ActorRelation () {
32     }
33 //  ActorRelation subclasses constructor
34     protected ActorRelation (Study from, User to) {
35 //  ---------------------------------------------
36       super(from);
37       this.refer = to;
38     }
39
40 //  ==============================================================================================================================
41 //  Public member functions
42 //  ==============================================================================================================================
43
44     public User getTo () {
45 //  --------------------
46       return refer;
47     }
48     protected void setTo (Persistent to) {
49 //  ------------------------------------
50       refer = (User)to;
51     }
52 }