gov.nih.nci.caarray.external.v1_0
Class AbstractCaArrayEntity
java.lang.Object
gov.nih.nci.caarray.external.v1_0.AbstractCaArrayEntity
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AbstractExperimentGraphNode, ArrayDataType, ArrayDesign, ArrayProvider, AssayType, Category, Experiment, ExperimentalContact, Factor, File, FileType, Person, QuantitationType, Term, TermSource
public abstract class AbstractCaArrayEntity
- extends java.lang.Object
- implements java.io.Serializable
AbstractCaArrayEntity is the base class for objects in the caArray external model that can be dereferenced.
An instance of AbstractCaArrayEntity has an id which can be used to retrieve that instance later. It can be
thought of similarly to a URL or EPR.
- Author:
- dkokotov
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object obj)
Id properties are used to test for euality, if they are not null; otherwise, the other properties are used. |
java.lang.String |
getId()
|
CaArrayEntityReference |
getReference()
|
int |
hashCode()
Hashcode, based on id when not null; otherwise, the other properties are used to comute the hash code. |
void |
setId(java.lang.String id)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AbstractCaArrayEntity
public AbstractCaArrayEntity()
getId
public java.lang.String getId()
- Returns:
- the id for this entity. The id uniquely identifies both the entity type and the specific instance
of the entity, such that the external API can provide a method to retrieve an entity given an id.
setId
public void setId(java.lang.String id)
- Parameters:
id
- the id to set
getReference
public CaArrayEntityReference getReference()
- Returns:
- a reference to this entity
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Id properties are used to test for euality, if they are not null; otherwise, the other properties are used.
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- object to compare this with.
- Returns:
- true if both ids are non-null and equal, or all properties are equal when id is null.
hashCode
public int hashCode()
- Hashcode, based on id when not null; otherwise, the other properties are used to comute the hash code.
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- hashcode computed from id when not null, other other properties.