eu.etaxonomy.cdm.model.agent
Class InstitutionalMembership

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.VersionableEntity
          extended by eu.etaxonomy.cdm.model.agent.InstitutionalMembership
All Implemented Interfaces:
ICdmBase, IVersionableEntity, Serializable, Cloneable

@Entity
public class InstitutionalMembership
extends VersionableEntity
implements Cloneable

This class allows to hold one institution to which a person is affiliated. It includes time period of membership and role of the person in this institution. In case one person belongs to several institutions a corresponding number of instances of InstitutionalMembership have to be created.

Version:
1.0
Author:
m.doering
See Also:
Serialized Form

Field Summary
static Logger logger
           
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
protected InstitutionalMembership()
           
  InstitutionalMembership(Institution institute, Person person, TimePeriod period, String department, String role)
          Class constructor using an institution, a person, a time period, a department name string and a role string.
 
Method Summary
 Object clone()
          Clones this InstitutionalMembership.
 String getDepartment()
          Returns the string representing the name of the department (within the institution involved in this institutional membership) to which the person belongs.
 Institution getInstitute()
          Returns the institution corresponding to this institutional membership.
 TimePeriod getPeriod()
          Returns the time period during which the person involved in this institutional membership belonged to the institution also involved in it.
 Person getPerson()
          Returns the person involved in this institutional membership.
 String getRole()
          Returns the string representing the role played by the person within the institution (or within the department) involved in this institutional membership.
static InstitutionalMembership NewInstance()
           
 void setDepartment(String department)
           
 void setInstitute(Institution newInstitute)
          Assigns an new institution (replacing the actual one) to this institutional membership.
 void setPeriod(TimePeriod period)
           
protected  void setPerson(Person person)
          Assigns a new person (replacing the actual one) to this institutional membership.
 void setRole(String role)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity
equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 

Field Detail

logger

public static final Logger logger
Constructor Detail

InstitutionalMembership

protected InstitutionalMembership()

InstitutionalMembership

public InstitutionalMembership(Institution institute,
                               Person person,
                               TimePeriod period,
                               String department,
                               String role)
Class constructor using an institution, a person, a time period, a department name string and a role string. Adds this membership to the persons memberships.

Parameters:
institute - the institution in which the person is a member
person - the person who is a member of the institution
period - the time period during which the person belonged to the institution
department - the name string of the department (within the institution) this person is working in
role - the string which identifies the role played by the person in the institution (or in the department)
See Also:
Person, Institution
Method Detail

NewInstance

public static InstitutionalMembership NewInstance()

getPerson

public Person getPerson()
Returns the person involved in this institutional membership.

See Also:
Person.institutionalMemberships, Person.addInstitutionalMembership(Institution, TimePeriod, String, String)

setPerson

protected void setPerson(Person person)
Assigns a new person (replacing the actual one) to this institutional membership. This method also updates both sets of institutions the two persons (the new one and the substituted one) belong to.

Parameters:
newPerson - the new person to be included in this institutional membership
See Also:
getPerson(), Person.removeInstitutionalMembership(InstitutionalMembership)

getInstitute

public Institution getInstitute()
Returns the institution corresponding to this institutional membership.


setInstitute

public void setInstitute(Institution newInstitute)
Assigns an new institution (replacing the actual one) to this institutional membership.

Parameters:
newInstitute - the new institution
See Also:
getInstitute()

getPeriod

public TimePeriod getPeriod()
Returns the time period during which the person involved in this institutional membership belonged to the institution also involved in it.


setPeriod

public void setPeriod(TimePeriod period)
See Also:
getPeriod()

getDepartment

public String getDepartment()
Returns the string representing the name of the department (within the institution involved in this institutional membership) to which the person belongs.


setDepartment

public void setDepartment(String department)
See Also:
getDepartment()

getRole

public String getRole()
Returns the string representing the role played by the person within the institution (or within the department) involved in this institutional membership.


setRole

public void setRole(String role)
See Also:
getRole()

clone

public Object clone()
Clones this InstitutionalMembership. This is a shortcut that enables to create a new instance that differs only slightly from this InstitutionalMembership.

Overrides:
clone in class VersionableEntity
See Also:
VersionableEntity, Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.