Class MappingDefinition

  • Direct Known Subclasses:
    ELMappingDefinition

    public class MappingDefinition
    extends Object
    Specifies a custom mapping definition between two classes(data types). All Mapping definitions are bi-directional by default. Global configuration element values are inherited

    Required Attributes:

    Optional Attributes:

    date-format The string format of Date fields. This is used for field mapping between Strings and Dates

    stop-on-errors Indicates whether Dozer should stop mapping fields and throw the Exception if an error is encountered while performing a field mapping. It is recommended that this is set to "true". If set to "false", Dozer will trap the exception, log the error, and then continue mapping subsequent fields The default value is "true"

    wildcard Indicates whether Dozer automatically map fields that have the same name. The default value is "true"

    wildcard-case-insensitive Indicates whether Dozer should ignore the case of field names when applying wildcard mapping. The default value is "false"

    trim-strings Indicates whether Dozer automatically trims String values prior to setting the destination value. The default value is "false"

    map-null Indicates whether null values are mapped. The default value is "true"

    map-empty-string Indicates whether empty string values are mapped. The default value is "true"

    bean-factory The factory class to create data objects. This typically will not be specified. By default Dozer constructs new instances of data objects by invoking the no-arg constructor

    type Indicates whether this mapping is bi-directional or only one-way. Typically this will be set to bi-directional. The default is "bi-directional".

    map-id The id that uniquely identifies this mapping definition. This typically will not be specified. You would only need to specify this for only need this for special context based mapping and when mapping between Map objects and Custom Data Objects.

    relationship-type Indications whether collections are mapped cumulative or non-cumulative. cumulative indicates the element is added to the collection.

    non-cumulative indicates the element will be added or an existing entry will be updated.