Class TermTypedByRelationshipMapper

    • Method Detail

      • mapRelationshipToInstanceProperties

        protected void mapRelationshipToInstanceProperties​(TypedBy termTYPEDBYRelationship,
                                                           InstanceProperties instanceProperties)
        Map the supplied relationship to omrs InstanceProperties.
        Overrides:
        mapRelationshipToInstanceProperties in class RelationshipMapper<TypedBy>
        Parameters:
        termTYPEDBYRelationship - supplied relationship
        instanceProperties - equivalent instance properties to the relationship
      • mapPrimitiveToRelationship

        protected boolean mapPrimitiveToRelationship​(TypedBy termTYPEDBYRelationship,
                                                     String propertyName,
                                                     Object value)
        Map a primitive omrs property to the termTYPEDBYRelationship object.
        Overrides:
        mapPrimitiveToRelationship in class RelationshipMapper<TypedBy>
        Parameters:
        termTYPEDBYRelationship - the omas relationship to be updated
        propertyName - the omrs property name
        value - the omrs primitive property value
        Returns:
        true if the propertyName was recognised and mapped to the relationship, otherwise false
      • mapEnumToRelationship

        protected boolean mapEnumToRelationship​(TypedBy termTYPEDBYRelationship,
                                                String propertyName,
                                                EnumPropertyValue enumPropertyValue)
        Description copied from class: RelationshipMapper
        Map an omrs enum property to a Subject Area relationship property. The child class is expected to override this method if the type has enum properties
        Overrides:
        mapEnumToRelationship in class RelationshipMapper<TypedBy>
        Parameters:
        termTYPEDBYRelationship - the relationship to be updated
        propertyName - the omrs property name
        enumPropertyValue - the omrs enum property value
        Returns:
        true if it was a property we were expecting , otherwise false;
      • getRelationshipInstance

        protected TypedBy getRelationshipInstance()