Interface AutomaticElementMappingRule


  • @OpenApiAll
    public interface AutomaticElementMappingRule
    Rule for describing when source element can be mapped to target element without user input
    • Method Detail

      • getElementToMap

        @CheckForNull
        Element getElementToMap​(Element sourceElement,
                                java.util.List<Element> targetElements)
        Get target element to be automatically mapped to the source element. If this method returns an element, provided elements will be mapped at once If this method returns null, user still can pair elements later manually
        Parameters:
        sourceElement - source element
        targetElements - list of candidate target elements. Target elements are always in the same nesting depth as the source element
        Returns:
        element that can be mapped automatically, without user input, to the source element
      • accept

        boolean accept​(TypedElement sourceElement)
        Gets if mapping rule can be applied to source element
        Parameters:
        sourceElement - source element (property)
        Returns:
        true if rule can be used, else false
      • isOneToOneMapping

        default boolean isOneToOneMapping()
        Allow one to one or many to one mapping.
        Returns:
        true if only one to one mapping is allowed, false - many to one