/*
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under the
 * License.
 *-----------------------------------------------------------------------------
 * $Id$
 *-----------------------------------------------------------------------------
 */
package org.objectweb.jonas.jtests.beans.relatives;

import javax.ejb.EJBLocalObject;
import java.util.Date;
import java.util.Set;

/**
 * This interface describes some characteristics of the relationships between
 * relatives of a familly. The goal was to have a simple model supporting various
 * kind of relationships (1-1, 1-n, n-n) and a wide range of field types.
 * @author  Christophe Ney - cney@batisseurs.com
 */
public interface RelativeLocal extends EJBLocalObject {

    /**
     * Get the relative's name
     */
    public String getFullName();

    /**
     * Set the relative's name
     */
    public void setFullName(String name);

    /**
     * Get the relative's sex
     */
    public boolean getIsMale();

    /**
     * Set the relative's sex
     */
    public void setIsMale(boolean isMale);

    /**
     * Get the relative's lucky number
     */
    public int getLuckyNumber();

    /**
     * Set the relative's age
     */
    public void setLuckyNumber(int luckyNumber);

    /**
     * Get the relative's average of annual visits to other relatives
     */
    public double getAverageAnnualVisits();

    /**
     * Set the relative's average of annual visits to other relatives
     */
    public void setAverageAnnualVisits(double averageAnnualVisits);

    /**
     * Get the relative's birthdate
     */
    public Date getBirthdate();

    /**
     * Set the relative's birthdate
     */
    public void setBirthdate(Date birthdate);

    /**
     * Get the (unique) spouse for this relative.
     * This is a possibly null, one-to-one relationship.
     */
    public RelativeLocal getSpouse();

    /**
     * Set the spouse for this relative
     */
    public void setSpouse(RelativeLocal spouse);

    /**
     * Get all sibblings (brothers and sisters) for this relative.
     * This is a never empty one-to-many relationship since it includes
     * the always relative calling the method.
     */
    public Set getSibblings();

    /**
     * Set the sibblings for this relative
     */
    public void setSibblings(Set sibblings);

    /**
     * Get all relatives that has been visited by this relative.
     * This is a possibily empty many-to-many relationship.
     */
    public Set getVisitedRelatives();


    /**
     * Set the relatives that has been visited by this relative.
     */
    public void setVisitedRelatives(Set sibblings);
}
