[Task 57188] added the logic for the advanced place column calculation. Enforced that all virtual metadata are valid metadatafields

This commit is contained in:
Raf Ponsaerts
2018-11-20 14:32:12 +01:00
parent 0ba6d75a30
commit cfeabe349c
7 changed files with 206 additions and 25 deletions

View File

@@ -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);
}
}