mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 04:23:13 +00:00
[DURACOM-125][#8736] Preserved order of modified MetadataValues
feat: - Introduced new Class with static methods usable to order `MetadataValue` lists; - Introduced ITs also for `PatchMetadata` replace operations; - Introduced new method `DspaceObject#getMetadataFieldId`. ref: - Replaced old sort method inside `ItemServiceImpl` with the new one
This commit is contained in:
@@ -19,6 +19,7 @@ import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.ReloadableEntity;
|
||||
@@ -171,6 +172,14 @@ public class MetadataValue implements ReloadableEntity<Integer> {
|
||||
this.metadataField = metadataField;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code MetadataField#getID()}
|
||||
*/
|
||||
@Transient
|
||||
protected Integer getMetadataFieldId() {
|
||||
return getMetadataField().getID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the metadata value.
|
||||
*
|
||||
|
Reference in New Issue
Block a user