- java.lang.Object
-
- com.remondis.remap.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMappingModel.TransformationSearchResultRepresents the search results, when inspecting theMappingModel.
-
Method Summary
-
-
-
Method Detail
-
findMappingBySource
public MappingModel.TransformationSearchResult findMappingBySource(Predicate<String> sourcePropertySelector)
- Parameters:
sourcePropertySelector- (Optional) The source selector predicate. May benullif the search is intended by the destination field.- Returns:
- Returns the search result.
-
findMappingByDestination
public MappingModel.TransformationSearchResult findMappingByDestination(Predicate<String> destinationPropertySelector)
- Parameters:
destinationPropertySelector- The destination selector predicate.- Returns:
- Returns the search result.
-
findMappingBySource
public MappingModel.TransformationSearchResult findMappingBySource(FieldSelector<S> sourceSelector)
- Parameters:
sourceSelector- The destination field selector.- Returns:
- Returns the search result.
-
findMappingByDestination
public MappingModel.TransformationSearchResult findMappingByDestination(FieldSelector<D> destinationSelector)
- Parameters:
destinationSelector- The destination field selector.- Returns:
- Returns the search result.
-
findMapping
public MappingModel.TransformationSearchResult findMapping(FieldSelector<S> sourceSelector, FieldSelector<D> destinationSelector)
- Parameters:
sourceSelector- The destination field selector.destinationSelector- The destination field selector.- Returns:
- Returns the search result.
-
findMapping
public MappingModel.TransformationSearchResult findMapping(Predicate<String> sourcePropertySelector, Predicate<String> destinationPropertySelector)
- Parameters:
sourcePropertySelector- (Optional) The source selector predicate. May benullif 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 aPredicateto select a field by field name. This predicate matches if the field nameString.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 aPredicateto select a field by field name while ignoring the case. This predicate matches if the field nameString.equalsIgnoreCase(String)the Java Bean property name.- Parameters:
sourceFieldName- The source field name.- Returns:
- Returns a new
Predicate.
-
-