001: /*
002: * Software distributed under the License is distributed on an "AS IS" basis,
003: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
004: * License for the specific language governing rights and limitations under the
005: * License.
006: *-----------------------------------------------------------------------------
007: * $Id: RelativeLocal.java 846 2002-11-25 16:17:54Z chassand $
008: *-----------------------------------------------------------------------------
009: */
010: package org.objectweb.jonas.jtests.beans.relatives;
011:
012: import javax.ejb.EJBLocalObject;
013: import java.util.Date;
014: import java.util.Set;
015:
016: /**
017: * This interface describes some characteristics of the relationships between
018: * relatives of a familly. The goal was to have a simple model supporting various
019: * kind of relationships (1-1, 1-n, n-n) and a wide range of field types.
020: * @author Christophe Ney - cney@batisseurs.com
021: */
022: public interface RelativeLocal extends EJBLocalObject {
023:
024: /**
025: * Get the relative's name
026: */
027: public String getFullName();
028:
029: /**
030: * Set the relative's name
031: */
032: public void setFullName(String name);
033:
034: /**
035: * Get the relative's sex
036: */
037: public boolean getIsMale();
038:
039: /**
040: * Set the relative's sex
041: */
042: public void setIsMale(boolean isMale);
043:
044: /**
045: * Get the relative's lucky number
046: */
047: public int getLuckyNumber();
048:
049: /**
050: * Set the relative's age
051: */
052: public void setLuckyNumber(int luckyNumber);
053:
054: /**
055: * Get the relative's average of annual visits to other relatives
056: */
057: public double getAverageAnnualVisits();
058:
059: /**
060: * Set the relative's average of annual visits to other relatives
061: */
062: public void setAverageAnnualVisits(double averageAnnualVisits);
063:
064: /**
065: * Get the relative's birthdate
066: */
067: public Date getBirthdate();
068:
069: /**
070: * Set the relative's birthdate
071: */
072: public void setBirthdate(Date birthdate);
073:
074: /**
075: * Get the (unique) spouse for this relative.
076: * This is a possibly null, one-to-one relationship.
077: */
078: public RelativeLocal getSpouse();
079:
080: /**
081: * Set the spouse for this relative
082: */
083: public void setSpouse(RelativeLocal spouse);
084:
085: /**
086: * Get all sibblings (brothers and sisters) for this relative.
087: * This is a never empty one-to-many relationship since it includes
088: * the always relative calling the method.
089: */
090: public Set getSibblings();
091:
092: /**
093: * Set the sibblings for this relative
094: */
095: public void setSibblings(Set sibblings);
096:
097: /**
098: * Get all relatives that has been visited by this relative.
099: * This is a possibily empty many-to-many relationship.
100: */
101: public Set getVisitedRelatives();
102:
103: /**
104: * Set the relatives that has been visited by this relative.
105: */
106: public void setVisitedRelatives(Set sibblings);
107: }
|