Rename leftwardLabel and rightwardLabel

Renamed the leftwardLabel and rightwardlabel for Relationship to
leftwardValue and rightwardValue. Renamed the same values for
RelationshipType to leftwardType and rightwardType.
This commit is contained in:
Jelle Pelgrims
2019-08-13 15:30:43 +02:00
parent 718340e3d3
commit ed17587170
36 changed files with 368 additions and 367 deletions

View File

@@ -87,16 +87,16 @@ public class RelationshipMetadataServiceImpl implements RelationshipMetadataServ
int place = 0;
boolean isLeftwards;
if (StringUtils.equals(relationshipType.getLeftType().getLabel(), entityType)) {
hashMaps = virtualMetadataPopulator.getMap().get(relationshipType.getLeftwardLabel());
hashMaps = virtualMetadataPopulator.getMap().get(relationshipType.getLeftwardType());
otherItem = relationship.getRightItem();
relationName = relationship.getRelationshipType().getLeftwardLabel();
relationName = relationship.getRelationshipType().getLeftwardType();
place = relationship.getLeftPlace();
isLeftwards = false; //if the current item is stored on the left,
// the name variant is retrieved from the rightwards label
} else if (StringUtils.equals(relationshipType.getRightType().getLabel(), entityType)) {
hashMaps = virtualMetadataPopulator.getMap().get(relationshipType.getRightwardLabel());
hashMaps = virtualMetadataPopulator.getMap().get(relationshipType.getRightwardType());
otherItem = relationship.getLeftItem();
relationName = relationship.getRelationshipType().getRightwardLabel();
relationName = relationship.getRelationshipType().getRightwardType();
place = relationship.getRightPlace();
isLeftwards = true; //if the current item is stored on the right,
// the name variant is retrieved from the leftwards label
@@ -131,7 +131,7 @@ public class RelationshipMetadataServiceImpl implements RelationshipMetadataServ
VirtualMetadataConfiguration virtualBean = entry.getValue();
if (virtualBean.getPopulateWithNameVariant()) {
String wardLabel = isLeftwards ? relationship.getLeftwardLabel() : relationship.getRightwardLabel();
String wardLabel = isLeftwards ? relationship.getLeftwardValue() : relationship.getRightwardValue();
if (wardLabel != null) {
resultingMetadataValueList.add(
constructRelationshipMetadataValue(context, item, relationship.getID(), place, key, virtualBean,