public class ConfigurationDefinition extends Object
Required Attributes:
Optional Attributes:
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".
date-format The string format of Date fields. This is used for field mapping between Strings and Dates
wildcard Indicates whether Dozer automatically map fields that have the same name. This will typically be set to "true". 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"
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
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.
custom-converters The custom converters to be registered with Dozer.
copy-by-references Indicates which class types should always be copied by reference
| Modifier and Type | Field and Description |
|---|---|
protected AllowedExceptionsDefinition |
allowedExceptions |
protected String |
beanFactory |
protected CopyByReferencesDefinition |
copyByReferences |
protected CustomConvertersDefinition |
customConverters |
protected String |
dateFormat |
protected Boolean |
mapEmptyString |
protected Boolean |
mapNull |
protected Relationship |
relationshipType |
protected Boolean |
stopOnErrors |
protected Boolean |
trimStrings |
protected VariablesDefinition |
variables |
protected Boolean |
wildcard |
protected Boolean |
wildcardCaseInsensitive |
| Constructor and Description |
|---|
ConfigurationDefinition() |
ConfigurationDefinition(MappingsDefinition parent) |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
build(BeanContainer beanContainer) |
MappingsDefinition |
end() |
AllowedExceptionsDefinition |
withAllowedExceptions() |
ConfigurationDefinition |
withBeanFactory(String beanFactory) |
CopyByReferencesDefinition |
withCopyByReferences() |
CustomConvertersDefinition |
withCustomConverters() |
ConfigurationDefinition |
withDateFormat(String dateFormat) |
ConfigurationDefinition |
withMapEmptyString(Boolean mapEmptyString) |
ConfigurationDefinition |
withMapNull(Boolean mapNull) |
ConfigurationDefinition |
withRelationshipType(Relationship relationshipType) |
ConfigurationDefinition |
withStopOnErrors(Boolean stopOnErrors) |
ConfigurationDefinition |
withTrimStrings(Boolean trimStrings) |
VariablesDefinition |
withVariables() |
ConfigurationDefinition |
withWildcard(Boolean wildcard) |
ConfigurationDefinition |
withWildcardCaseInsensitive(Boolean wildcardCaseInsensitive) |
protected Boolean stopOnErrors
protected String dateFormat
protected Boolean wildcard
protected Boolean wildcardCaseInsensitive
protected Boolean trimStrings
protected Boolean mapNull
protected Boolean mapEmptyString
protected String beanFactory
protected Relationship relationshipType
protected CustomConvertersDefinition customConverters
protected CopyByReferencesDefinition copyByReferences
protected AllowedExceptionsDefinition allowedExceptions
protected VariablesDefinition variables
public ConfigurationDefinition()
public ConfigurationDefinition(MappingsDefinition parent)
public ConfigurationDefinition withStopOnErrors(Boolean stopOnErrors)
public ConfigurationDefinition withDateFormat(String dateFormat)
public ConfigurationDefinition withWildcard(Boolean wildcard)
public ConfigurationDefinition withWildcardCaseInsensitive(Boolean wildcardCaseInsensitive)
public ConfigurationDefinition withTrimStrings(Boolean trimStrings)
public ConfigurationDefinition withMapNull(Boolean mapNull)
public ConfigurationDefinition withMapEmptyString(Boolean mapEmptyString)
public ConfigurationDefinition withBeanFactory(String beanFactory)
public ConfigurationDefinition withRelationshipType(Relationship relationshipType)
public CustomConvertersDefinition withCustomConverters()
public CopyByReferencesDefinition withCopyByReferences()
public AllowedExceptionsDefinition withAllowedExceptions()
public VariablesDefinition withVariables()
public MappingsDefinition end()
public Configuration build(BeanContainer beanContainer)
Copyright © 2005–2021 dozer. All rights reserved.