Salome HOME
Update copyrights 2014.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / ActorRelation.java
1 package org.splat.dal.bo.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-2014
15  */
16
17 import org.splat.dal.bo.kernel.Persistent;
18 import org.splat.dal.bo.kernel.Relation;
19 import org.splat.dal.bo.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 (final Study from, final User to) {
35 //  ---------------------------------------------
36       super(from);
37       this.refer = to;
38     }
39
40 //  ==============================================================================================================================
41 //  Public member functions
42 //  ==============================================================================================================================
43
44     @Override
45     public User getTo () {
46 //  --------------------
47       return refer;
48     }
49     @Override
50         public void setTo (final Persistent to) {
51 //  ------------------------------------
52       refer = (User)to;
53     }
54 }