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,IndexableLDNNotification,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-tuned
equals(java.lang.Object) and hashCode() 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 calling equals(java.lang.Object) or hashCode() on an IndexableObject
because it'll depend on the underlying object.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.discovery.IndexableObject
getID, getIndexedObject, getLastModified, getType, getTypeText, getUniqueIndexID, setIndexedObject