public class ClassDefinition extends Object
Required Attributes:
Optional Attributes:
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
factory-bean-id The id passed to the specified bean factory
map-set-method For Map backed objects, this indicates which setter method should be used to retrieve field values. This should only be used of Map backed objects.
map-get-method For Map backed objects, this indicates which getter method should be used to retrieve field values. This should only be used of Map backed objects.
create-method Which method to invoke to create a new instance of the class. This is typically not specified. By default, the no arg constructor(public or private) is used
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"
is-accessible Indicates whether Dozer bypasses getter/setter methods and accesses the field directly. This will typically be set to "false". The default value is "false". If set to "true", the getter/setter methods will NOT be invoked. You would want to set this to "true" if the field is lacking a getter or setter method.
| Modifier and Type | Field and Description |
|---|---|
protected String |
beanFactory |
protected String |
clazz |
protected String |
createMethod |
protected String |
factoryBeanId |
protected Boolean |
isAccessible |
protected Boolean |
mapEmptyString |
protected String |
mapGetMethod |
protected Boolean |
mapNull |
protected String |
mapSetMethod |
protected Boolean |
skipConstructor |
| Constructor and Description |
|---|
ClassDefinition() |
ClassDefinition(MappingDefinition parentMappingDefinition,
ConverterTypeDefinition parentConverterTypeDefinition) |
| Modifier and Type | Method and Description |
|---|---|
DozerClass |
build(BeanContainer beanContainer) |
MappingDefinition |
end() |
ConverterTypeDefinition |
endType() |
ClassDefinition |
withAccessible(Boolean accessible) |
ClassDefinition |
withBeanFactory(String beanFactory) |
ClassDefinition |
withClazz(String clazz) |
ClassDefinition |
withCreateMethod(String createMethod) |
ClassDefinition |
withFactoryBeanId(String factoryBeanId) |
ClassDefinition |
withMapEmptyString(Boolean mapEmptyString) |
ClassDefinition |
withMapGetMethod(String mapGetMethod) |
ClassDefinition |
withMapNull(Boolean mapNull) |
ClassDefinition |
withMapSetMethod(String mapSetMethod) |
ClassDefinition |
withSkipConstructor(Boolean skipConstructor) |
protected String clazz
protected String beanFactory
protected String factoryBeanId
protected String mapSetMethod
protected String mapGetMethod
protected String createMethod
protected Boolean mapNull
protected Boolean mapEmptyString
protected Boolean isAccessible
protected Boolean skipConstructor
public ClassDefinition()
public ClassDefinition(MappingDefinition parentMappingDefinition, ConverterTypeDefinition parentConverterTypeDefinition)
public ClassDefinition withClazz(String clazz)
public ClassDefinition withBeanFactory(String beanFactory)
public ClassDefinition withFactoryBeanId(String factoryBeanId)
public ClassDefinition withMapSetMethod(String mapSetMethod)
public ClassDefinition withMapGetMethod(String mapGetMethod)
public ClassDefinition withCreateMethod(String createMethod)
public ClassDefinition withMapNull(Boolean mapNull)
public ClassDefinition withMapEmptyString(Boolean mapEmptyString)
public ClassDefinition withAccessible(Boolean accessible)
public ClassDefinition withSkipConstructor(Boolean skipConstructor)
public MappingDefinition end()
public ConverterTypeDefinition endType()
public DozerClass build(BeanContainer beanContainer)
Copyright © 2005–2021 dozer. All rights reserved.