Package org.dspace.discovery.indexobject
Class AbstractIndexableObject<T extends ReloadableEntity<PK>,PK extends Serializable>
- java.lang.Object
-
- org.dspace.discovery.indexobject.AbstractIndexableObject<T,PK>
-
- Type Parameters:
T- Refers to the underlying entity that is linked to this objectPK- The type of ID that this entity uses
- All Implemented Interfaces:
IndexableObject<T,PK>
- Direct Known Subclasses:
IndexableClaimedTask,IndexableDSpaceObject,IndexableInProgressSubmission,IndexableMetadataField,IndexablePoolTask
public abstract class AbstractIndexableObject<T extends ReloadableEntity<PK>,PK extends Serializable> extends Object implements IndexableObject<T,PK>
This class exists in order to provide a default implementation for the equals and hashCode methods. Since IndexableObjects can be made multiple times for the same underlying object, we needed more finely-tunedequals(java.lang.Object)andhashCode()methods. We're simply checking that the underlying objects are equal and returning the hash-code for the underlying object. This way, we'll always get a proper result when callingequals(java.lang.Object)orhashCode()on an IndexableObject because it'll depend on the underlying object.
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.discovery.IndexableObject
getID, getIndexedObject, getLastModified, getType, getTypeText, getUniqueIndexID, setIndexedObject
-
-