mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
[Task 57188] added the logic for the advanced place column calculation. Enforced that all virtual metadata are valid metadatafields
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package org.dspace.content;
|
||||
|
||||
import org.hibernate.proxy.HibernateProxyHelper;
|
||||
|
||||
public class RelationshipMetadataValue extends MetadataValue {
|
||||
|
||||
private boolean useForPlace;
|
||||
@@ -11,4 +13,20 @@ public class RelationshipMetadataValue extends MetadataValue {
|
||||
public void setUseForPlace(boolean useForPlace) {
|
||||
this.useForPlace = useForPlace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
Class<?> objClass = HibernateProxyHelper.getClassWithoutInitializingProxy(obj);
|
||||
if (getClass() != objClass) {
|
||||
return false;
|
||||
}
|
||||
final RelationshipMetadataValue other = (RelationshipMetadataValue) obj;
|
||||
if (this.isUseForPlace() != other.isUseForPlace()) {
|
||||
return false;
|
||||
}
|
||||
return super.equals(obj);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user