Class MappingModel<S,​D>

  • Type Parameters:
    S - The source type.
    D - The destination type.

    public class MappingModel<S,​D>
    extends Object
    The mapping model provides access to field mappings. The field mappings can be used to transform single values.
    • Method Detail

      • findMappingBySource

        public MappingModel.TransformationSearchResult findMappingBySource​(Predicate<String> sourcePropertySelector)
        Parameters:
        sourcePropertySelector - (Optional) The source selector predicate. May be null if the search is intended by the destination field.
        Returns:
        Returns the search result.
      • findMapping

        public MappingModel.TransformationSearchResult findMapping​(Predicate<String> sourcePropertySelector,
                                                                   Predicate<String> destinationPropertySelector)
        Parameters:
        sourcePropertySelector - (Optional) The source selector predicate. May be null if the search is intended by the destination field.
        destinationPropertySelector - The destination selector predicate.
        Returns:
        Returns the search result.
      • nameEqualsPredicate

        public static Predicate<String> nameEqualsPredicate​(String sourceFieldName)
        Returns a Predicate to select a field by field name. This predicate matches if the field name String.equals(Object) the Java Bean property name.
        Parameters:
        sourceFieldName - The source field name.
        Returns:
        Returns a new Predicate.
      • nameEqualsPredicateIgnoreCase

        public static Predicate<String> nameEqualsPredicateIgnoreCase​(String sourceFieldName)
        Returns a Predicate to select a field by field name while ignoring the case. This predicate matches if the field name String.equalsIgnoreCase(String) the Java Bean property name.
        Parameters:
        sourceFieldName - The source field name.
        Returns:
        Returns a new Predicate.