Class ClassDefinition
- java.lang.Object
-
- com.github.dozermapper.core.builder.model.jaxb.ClassDefinition
-
- Direct Known Subclasses:
ELClassDefinition
public class ClassDefinition extends Object
Specifies one of the classes in the mapping definition. All Mapping definitions are bi-directional by default. Global configuration and Mapping element values are inheritedRequired 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbeanFactoryprotected Stringclazzprotected StringcreateMethodprotected StringfactoryBeanIdprotected BooleanisAccessibleprotected BooleanmapEmptyStringprotected StringmapGetMethodprotected BooleanmapNullprotected StringmapSetMethodprotected BooleanskipConstructor
-
Constructor Summary
Constructors Constructor Description ClassDefinition()ClassDefinition(MappingDefinition parentMappingDefinition, ConverterTypeDefinition parentConverterTypeDefinition)
-
Method Summary
-
-
-
Field Detail
-
clazz
protected String clazz
-
beanFactory
protected String beanFactory
-
factoryBeanId
protected String factoryBeanId
-
mapSetMethod
protected String mapSetMethod
-
mapGetMethod
protected String mapGetMethod
-
createMethod
protected String createMethod
-
mapNull
protected Boolean mapNull
-
mapEmptyString
protected Boolean mapEmptyString
-
isAccessible
protected Boolean isAccessible
-
skipConstructor
protected Boolean skipConstructor
-
-
Constructor Detail
-
ClassDefinition
public ClassDefinition()
-
ClassDefinition
public ClassDefinition(MappingDefinition parentMappingDefinition, ConverterTypeDefinition parentConverterTypeDefinition)
-
-
Method Detail
-
withClazz
public ClassDefinition withClazz(String clazz)
-
withBeanFactory
public ClassDefinition withBeanFactory(String beanFactory)
-
withFactoryBeanId
public ClassDefinition withFactoryBeanId(String factoryBeanId)
-
withMapSetMethod
public ClassDefinition withMapSetMethod(String mapSetMethod)
-
withMapGetMethod
public ClassDefinition withMapGetMethod(String mapGetMethod)
-
withCreateMethod
public ClassDefinition withCreateMethod(String createMethod)
-
withMapNull
public ClassDefinition withMapNull(Boolean mapNull)
-
withMapEmptyString
public ClassDefinition withMapEmptyString(Boolean mapEmptyString)
-
withAccessible
public ClassDefinition withAccessible(Boolean accessible)
-
withSkipConstructor
public ClassDefinition withSkipConstructor(Boolean skipConstructor)
-
end
public MappingDefinition end()
-
endType
public ConverterTypeDefinition endType()
-
build
public DozerClass build(BeanContainer beanContainer)
-
getParentMappingDefinition
public MappingDefinition getParentMappingDefinition()
-
getParentConverterTypeDefinition
public ConverterTypeDefinition getParentConverterTypeDefinition()
-
getClazz
public String getClazz()
-
setClazz
protected void setClazz(String clazz)
-
getBeanFactory
public String getBeanFactory()
-
setBeanFactory
protected void setBeanFactory(String beanFactory)
-
getFactoryBeanId
public String getFactoryBeanId()
-
setFactoryBeanId
protected void setFactoryBeanId(String factoryBeanId)
-
getMapSetMethod
public String getMapSetMethod()
-
setMapSetMethod
protected void setMapSetMethod(String mapSetMethod)
-
getMapGetMethod
public String getMapGetMethod()
-
setMapGetMethod
protected void setMapGetMethod(String mapGetMethod)
-
getCreateMethod
public String getCreateMethod()
-
setCreateMethod
protected void setCreateMethod(String createMethod)
-
getMapNull
public Boolean getMapNull()
-
setMapNull
protected void setMapNull(Boolean mapNull)
-
getMapEmptyString
public Boolean getMapEmptyString()
-
setMapEmptyString
protected void setMapEmptyString(Boolean mapEmptyString)
-
getIsAccessible
public Boolean getIsAccessible()
-
setIsAccessible
protected void setIsAccessible(Boolean accessible)
-
getSkipConstructor
public Boolean getSkipConstructor()
-
setSkipConstructor
protected void setSkipConstructor(Boolean skipConstructor)
-
-