KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > relatives > RelativeLocal


1 /*
2  * Software distributed under the License is distributed on an "AS IS" basis,
3  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
4  * License for the specific language governing rights and limitations under the
5  * License.
6  *-----------------------------------------------------------------------------
7  * $Id: RelativeLocal.java,v 1.3 2002/11/25 16:17:54 chassand Exp $
8  *-----------------------------------------------------------------------------
9  */

10 package org.objectweb.jonas.jtests.beans.relatives;
11
12 import javax.ejb.EJBLocalObject JavaDoc;
13 import java.util.Date JavaDoc;
14 import java.util.Set JavaDoc;
15
16 /**
17  * This interface describes some characteristics of the relationships between
18  * relatives of a familly. The goal was to have a simple model supporting various
19  * kind of relationships (1-1, 1-n, n-n) and a wide range of field types.
20  * @author Christophe Ney - cney@batisseurs.com
21  */

22 public interface RelativeLocal extends EJBLocalObject JavaDoc {
23
24     /**
25      * Get the relative's name
26      */

27     public String JavaDoc getFullName();
28
29     /**
30      * Set the relative's name
31      */

32     public void setFullName(String JavaDoc name);
33
34     /**
35      * Get the relative's sex
36      */

37     public boolean getIsMale();
38
39     /**
40      * Set the relative's sex
41      */

42     public void setIsMale(boolean isMale);
43
44     /**
45      * Get the relative's lucky number
46      */

47     public int getLuckyNumber();
48
49     /**
50      * Set the relative's age
51      */

52     public void setLuckyNumber(int luckyNumber);
53
54     /**
55      * Get the relative's average of annual visits to other relatives
56      */

57     public double getAverageAnnualVisits();
58
59     /**
60      * Set the relative's average of annual visits to other relatives
61      */

62     public void setAverageAnnualVisits(double averageAnnualVisits);
63
64     /**
65      * Get the relative's birthdate
66      */

67     public Date JavaDoc getBirthdate();
68
69     /**
70      * Set the relative's birthdate
71      */

72     public void setBirthdate(Date JavaDoc birthdate);
73
74     /**
75      * Get the (unique) spouse for this relative.
76      * This is a possibly null, one-to-one relationship.
77      */

78     public RelativeLocal getSpouse();
79
80     /**
81      * Set the spouse for this relative
82      */

83     public void setSpouse(RelativeLocal spouse);
84
85     /**
86      * Get all sibblings (brothers and sisters) for this relative.
87      * This is a never empty one-to-many relationship since it includes
88      * the always relative calling the method.
89      */

90     public Set JavaDoc getSibblings();
91
92     /**
93      * Set the sibblings for this relative
94      */

95     public void setSibblings(Set JavaDoc sibblings);
96
97     /**
98      * Get all relatives that has been visited by this relative.
99      * This is a possibily empty many-to-many relationship.
100      */

101     public Set JavaDoc getVisitedRelatives();
102
103
104     /**
105      * Set the relatives that has been visited by this relative.
106      */

107     public void setVisitedRelatives(Set JavaDoc sibblings);
108 }
109
Popular Tags