F - B - public abstract static class DefaultMapperFactory.MapperFactoryBuilder<F extends DefaultMapperFactory,B extends DefaultMapperFactory.MapperFactoryBuilder<F,B>> extends Object
DefaultMapperFactory.Builder below for example of how to subclass.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
alwaysCreateMultipleMapperWrapper
Internal Property to always use
MultipleMapperWrapper even if there are no custom ObjectFactory and only one Mapper
found. |
protected Boolean |
captureFieldContext
The configured value for whether full field context should be captured
upon mapping of every field.
|
protected ClassMapBuilderFactory |
classMapBuilderFactory
The ClassMapBuilderFactory configured for the MapperFactory
|
protected Set<ClassMap<?,?>> |
classMaps
The class maps configured to initialize the MapperFactory
|
protected CodeGenerationStrategy |
codeGenerationStrategy
The CodeGenerationStrategy configured for the MapperFactory
|
protected CompilerStrategy |
compilerStrategy
The CompilerStrategy configured for the MapperFactory
|
protected ConstructorResolverStrategy |
constructorResolverStrategy
The ConstructorResolverStrategy configured for the MapperFactory
|
protected ConverterFactory |
converterFactory
The ConverterFactory configured for the MapperFactory
|
protected Boolean |
dumpStateOnException
The configured value of whether the full state of the core Orika
mapping objects should be printed on exception
|
protected Boolean |
favorExtension
The configured default value for the 'favorExtension' option on
registered class-maps (when one has not been explicitly specified).
|
protected Boolean |
mapNulls
The configured value of whether or not to map null values; if false,
they will be ignored, and any existing value is unchanged in case of
null.
|
protected MappingContextFactory |
mappingContextFactory
The MappingContextFactory configured for the MapperFactory
|
protected PropertyResolverStrategy |
propertyResolverStrategy
The PropertyResolverStrategy configured for the MapperFactory
|
protected SuperTypeResolverStrategy |
superTypeStrategy
The SuperTypeResolverStrategy configured for the MapperFactory
|
protected UnenhanceStrategy |
unenhanceStrategy
The UnenhanceStrategy configured for the MapperFactory
|
protected Boolean |
useAutoMapping
The configured value of whether or not to use auto-mapping for the
MapperFactory
|
protected Boolean |
useBuiltinConverters
The configured value of whether or not to use built-in converters for
the MapperFactory
|
| Constructor and Description |
|---|
MapperFactoryBuilder()
Instantiates a new MapperFactoryBuilder
|
| Modifier and Type | Method and Description |
|---|---|
abstract F |
build() |
B |
captureFieldContext(boolean captureFieldContext)
Specifies whether full field context should be captured by generated mappers.
|
B |
classMapBuilderFactory(ClassMapBuilderFactory classMapBuilderFactory)
Configure the ClassMapBuilderFactory to use with the generated
MapperFactory
|
B |
classMaps(Set<ClassMap<?,?>> classMaps)
Set the class maps to be used in initializing this mapper factory
|
B |
codeGenerationStrategy(CodeGenerationStrategy codeGenerationStrategy)
Configure a CodeGenerationStrategy with this
MapperFactory, which may be used to configure/customize the
individual mapping Specifications that are used to generate code for
the various mapping scenarios.
|
B |
compilerStrategy(CompilerStrategy compilerStrategy)
Configure the CompilerStrategy to use with the generated
MapperFactory
|
B |
constructorResolverStrategy(ConstructorResolverStrategy constructorResolverStrategy)
Configure the ConstructorResolverStrategy to use with the generated
MapperFactory
|
B |
converterFactory(ConverterFactory converterFactory)
Configure the ConverterFactory to use with the generated
MapperFactory
|
B |
dumpStateOnException(boolean dumpStateOnException)
Configure whether to dump the current state of the mapping
infrastructure objects upon occurrence of an exception while mapping.
|
B |
favorExtension(boolean favorExtension)
Configure whether to favorExtension by default in registered
class-maps (when a value has not been explicitly specified on the
class-map builder).
|
CodeGenerationStrategy |
getCodeGenerationStrategy()
Get a reference to the CodeGenerationStrategy associated with this
MapperFactory, which may be used to configure/customize the
individual mapping Specifications that are used to generate code for
the various mapping scenarios.
|
B |
mapNulls(boolean mapNulls)
Configure whether to map nulls in generated mapper code
|
B |
mappingContextFactory(MappingContextFactory mappingContextFactory)
Configure the MappingContextFactory to use with the generated
MapperFactory
|
B |
propertyResolverStrategy(PropertyResolverStrategy propertyResolverStrategy)
Configure the PropertyResolverStrategy to use with the generated
MapperFactory
|
protected abstract B |
self() |
B |
superTypeResolverStrategy(SuperTypeResolverStrategy superTypeStrategy)
Configure the SuperTypeResolverStrategy to use with the generated
MapperFactory
|
B |
unenhanceStrategy(UnenhanceStrategy unenhanceStrategy)
Configure the UnenhanceStrategy to use with the generated
MapperFactory
|
B |
useAutoMapping(boolean useAutoMapping)
Configure whether to use auto-mapping with the generated
MapperFactory
|
B |
useBuiltinConverters(boolean useBuiltinConverters)
Configure whether to use built-in converters with the generated
MapperFactory
|
B |
usedBuiltinConverters(boolean useBuiltinConverters)
Deprecated.
use
useBuiltinConverters(boolean) instead |
protected UnenhanceStrategy unenhanceStrategy
protected SuperTypeResolverStrategy superTypeStrategy
protected ConstructorResolverStrategy constructorResolverStrategy
protected CompilerStrategy compilerStrategy
protected Set<ClassMap<?,?>> classMaps
protected ConverterFactory converterFactory
protected PropertyResolverStrategy propertyResolverStrategy
protected ClassMapBuilderFactory classMapBuilderFactory
protected MappingContextFactory mappingContextFactory
protected CodeGenerationStrategy codeGenerationStrategy
protected Boolean useBuiltinConverters
protected Boolean useAutoMapping
protected Boolean mapNulls
protected Boolean dumpStateOnException
protected Boolean favorExtension
protected Boolean captureFieldContext
protected boolean alwaysCreateMultipleMapperWrapper
MultipleMapperWrapper even if there are no custom ObjectFactory and only one Mapper
found.
This makes no sense for production: Because of the (small) performance penalty the MultipleMapperWrapper should only be
use when necessary.
But for Testing the MultipleMapperWrapper should be use in one TestSuite for all TestCase to test as much scenarios as possible.
public MapperFactoryBuilder()
protected abstract B self()
this
MapperFactoryBuilderpublic B classMaps(Set<ClassMap<?,?>> classMaps)
classMaps - this MapperFactoryBuilderpublic B unenhanceStrategy(UnenhanceStrategy unenhanceStrategy)
unenhanceStrategy - this MapperFactoryBuilderpublic B superTypeResolverStrategy(SuperTypeResolverStrategy superTypeStrategy)
superTypeStrategy - this MapperFactoryBuilderpublic B constructorResolverStrategy(ConstructorResolverStrategy constructorResolverStrategy)
constructorResolverStrategy - this MapperFactoryBuilderpublic B converterFactory(ConverterFactory converterFactory)
converterFactory - this MapperFactoryBuilderpublic B compilerStrategy(CompilerStrategy compilerStrategy)
compilerStrategy - this MapperFactoryBuilderpublic B propertyResolverStrategy(PropertyResolverStrategy propertyResolverStrategy)
propertyResolverStrategy - this MapperFactoryBuilderpublic B classMapBuilderFactory(ClassMapBuilderFactory classMapBuilderFactory)
classMapBuilderFactory - this MapperFactoryBuilderpublic B mappingContextFactory(MappingContextFactory mappingContextFactory)
mappingContextFactory - this MapperFactoryBuilderpublic B useAutoMapping(boolean useAutoMapping)
useAutoMapping - this MapperFactoryBuilderpublic B useBuiltinConverters(boolean useBuiltinConverters)
useBuiltinConverters - this MapperFactoryBuilder@Deprecated public B usedBuiltinConverters(boolean useBuiltinConverters)
useBuiltinConverters(boolean) insteaduseBuiltinConverters - public B mapNulls(boolean mapNulls)
mapNulls - this MapperFactoryBuilderpublic B dumpStateOnException(boolean dumpStateOnException)
dumpStateOnException - this MapperFactoryBuilderpublic B favorExtension(boolean favorExtension)
favorExtension - this MapperFactoryBuilderpublic B captureFieldContext(boolean captureFieldContext)
If true, the result is that the following calls will return a meaningful value, relative to
the currently mapped source and destination fields:
MappingContext.getFullyQualifiedSourcePath()
MappingContext.getFullyQualifiedDestinationPath()
MappingContext.getSourceExpressionPaths()
MappingContext.getDestinationExpressionPaths()
MappingContext.getSourceTypePaths()
MappingContext.getDestinationTypePaths()
If false, these methods will return null.
Default value is false
captureFieldContext - this MapperFactoryBuilderpublic CodeGenerationStrategy getCodeGenerationStrategy()
public B codeGenerationStrategy(CodeGenerationStrategy codeGenerationStrategy)
codeGenerationStrategy - this MapperFactoryBuilderpublic abstract F build()
Copyright © 2017 Glasnost. All Rights Reserved.