Package ubic.gemma.model.common
Class AbstractIdentifiable
java.lang.Object
ubic.gemma.model.common.AbstractIdentifiable
- All Implemented Interfaces:
Identifiable
- Direct Known Subclasses:
AbstractDescribable,AlternateName,AuditEvent,AuditEventType,AuditTrail,BibRefAnnotation,BioAssayDimension,BioSequence2GeneProduct,Chromosome,ChromosomeLocation,CurationDetails,DatabaseEntry,DataVector,Eigenvalue,Eigenvector,FactorValue,Geeq,Gene2GOAssociation,GeneAlias,GeneDifferentialExpressionMetaAnalysisResult,GeneSetMember,GroupAuthority,HitListSize,MeanVarianceRelation,Measurement,Multifunctionality,ProbeLoading,PvalueDistribution,SampleCoexpressionMatrix,SequenceSimilaritySearchResult,SingleCellDimension,Taxon,Unit
Base class for identifiable entities.
Provide basics for holding the ID and rendering the object as a string and forces implementation to overrride hashCode() and equals().
- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanImportant note: Two objects with the same class and non-null ID must be considered equal.getId()abstract inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidtoString()
-
Constructor Details
-
AbstractIdentifiable
public AbstractIdentifiable()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
setId
-
hashCode
public abstract int hashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted. -
equals
Important note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality. -
toString
-