gov.nih.nci.caarray.domain.project
Class ExperimentContact

java.lang.Object
  extended by gov.nih.nci.caarray.domain.AbstractCaArrayObject
      extended by gov.nih.nci.caarray.domain.AbstractCaArrayEntity
          extended by gov.nih.nci.caarray.domain.project.ExperimentContact
All Implemented Interfaces:
com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, java.io.Serializable

public class ExperimentContact
extends AbstractCaArrayEntity

See Also:
Serialized Form

Field Summary
static java.lang.String MAIN_POC_ROLE
          value of the Term for the POC Role.
static java.lang.String PI_ROLE
          value of the Term for the PI Role.
 
Fields inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayEntity
CAARRAY_LSID_AUTHORITY, CAARRAY_LSID_NAMESPACE
 
Fields inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
DEFAULT_BATCH_SIZE, DEFAULT_STRING_COLUMN_SIZE, LARGE_TEXT_FIELD_LENGTH
 
Constructor Summary
ExperimentContact()
          Default constructor, mostly for hibernate.
ExperimentContact(Experiment experiment, Person contact, java.util.Collection<Term> roles)
          Create a new ExperimentContact for given experiment, contacts, and roles.
ExperimentContact(Experiment experiment, Person contact, Term role)
          Create a new ExperimentContact for given experiment, contacts, and role.
 
Method Summary
 boolean equalsBaseContact(ExperimentContact experimentContact)
          Returns true if the underlying contact information is the same, ignoring the roles and Experiment.
 Person getContact()
          Gets the contact.
 Experiment getExperiment()
           
 Person getPerson()
          Gets the person.
 java.lang.String getRoleNames()
           
 java.util.Set<Term> getRoles()
          Gets the roles.
 boolean isMainPointOfContact()
          Returns whether this contact is the main POC for the experiment (based on whether he has the appropriate role).
 boolean isPrimaryInvestigator()
          Returns whether this contact is the PI for the experiment (based on whether he has the appropriate role).
 void setContact(Person contactVal)
          Sets the contact.
 void setExperiment(Experiment experiment)
           
 void setPerson(Person personVal)
          Sets the person.
 void setRoles(java.util.Set<Term> rolesVal)
          Sets the roles.
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayEntity
getLsid, getLsidAuthority, getLsidNamespace, getLsidObjectId, setLsid, setLsid, setLsidForEntity
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
equals, getCaBigId, getId, getPostLoadSecurityPolicies, getRemoteApiSecurityPolicies, hashCode, setCaBigId, setId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PI_ROLE

public static final java.lang.String PI_ROLE
value of the Term for the PI Role.

See Also:
Constant Field Values

MAIN_POC_ROLE

public static final java.lang.String MAIN_POC_ROLE
value of the Term for the POC Role.

See Also:
Constant Field Values
Constructor Detail

ExperimentContact

public ExperimentContact()
Default constructor, mostly for hibernate.


ExperimentContact

public ExperimentContact(Experiment experiment,
                         Person contact,
                         java.util.Collection<Term> roles)
Create a new ExperimentContact for given experiment, contacts, and roles.

Parameters:
experiment - the experiment for which this is a contact
contact - the contact
roles - the roles this contact has on the experiment

ExperimentContact

public ExperimentContact(Experiment experiment,
                         Person contact,
                         Term role)
Create a new ExperimentContact for given experiment, contacts, and role.

Parameters:
experiment - the experiment for which this is a contact
contact - the contact
role - the role this contact has on the experiment
Method Detail

getContact

public Person getContact()
Gets the contact.

Returns:
the contact

setContact

public void setContact(Person contactVal)
Sets the contact.

Parameters:
contactVal - the contact

getPerson

public Person getPerson()
Gets the person.

Returns:
the person

setPerson

public void setPerson(Person personVal)
Sets the person.

Parameters:
personVal - the person contact

getRoles

public java.util.Set<Term> getRoles()
Gets the roles.

Returns:
the roles

setRoles

public void setRoles(java.util.Set<Term> rolesVal)
Sets the roles.

Parameters:
rolesVal - the roles

getRoleNames

public java.lang.String getRoleNames()
Returns:
comma delimited list of each role names in roles list.

getExperiment

public Experiment getExperiment()
Returns:
the experiment

setExperiment

public void setExperiment(Experiment experiment)
Parameters:
experiment - the experiment to set

isPrimaryInvestigator

public boolean isPrimaryInvestigator()
Returns whether this contact is the PI for the experiment (based on whether he has the appropriate role).

Returns:
whether this contact is the PI for the experiment

isMainPointOfContact

public boolean isMainPointOfContact()
Returns whether this contact is the main POC for the experiment (based on whether he has the appropriate role).

Returns:
whether this contact is the main POC for the experiment

equalsBaseContact

public boolean equalsBaseContact(ExperimentContact experimentContact)
Returns true if the underlying contact information is the same, ignoring the roles and Experiment.

Parameters:
experimentContact - contact to compare to
Returns:
true if contact info is equal