[Task 73139] added javadocs to the AbstractIndexableObject

This commit is contained in:
Raf Ponsaerts
2020-09-11 11:51:25 +02:00
parent 3cd3587917
commit 370d15a78e

View File

@@ -12,6 +12,15 @@ import java.io.Serializable;
import org.dspace.core.ReloadableEntity; import org.dspace.core.ReloadableEntity;
import org.dspace.discovery.IndexableObject; import org.dspace.discovery.IndexableObject;
/**
* 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 a more finetuned
* equals and hashcode methods. We're simply checking that the underlying objects are equal and generating the hashcode
* for the underlying object. This way, we'll always get a proper result when calling equals or hashcode on an
* IndexableObject because it'll depend on the underlying object
* @param <T> Refers to the underlying entity that is linked to this object
* @param <PK> The type of ID that this entity uses
*/
public abstract class AbstractIndexableObject<T extends ReloadableEntity<PK>, PK extends Serializable> public abstract class AbstractIndexableObject<T extends ReloadableEntity<PK>, PK extends Serializable>
implements IndexableObject<T,PK> { implements IndexableObject<T,PK> {