ma.glasnost.orika.impl
Class DefaultMapperFactory.MapperFactoryBuilder<F extends DefaultMapperFactory,B extends DefaultMapperFactory.MapperFactoryBuilder<F,B>>

java.lang.Object
  extended by ma.glasnost.orika.impl.DefaultMapperFactory.MapperFactoryBuilder<F,B>
Type Parameters:
F -
B -
Direct Known Subclasses:
DefaultMapperFactory.Builder
Enclosing class:
DefaultMapperFactory

public abstract static class DefaultMapperFactory.MapperFactoryBuilder<F extends DefaultMapperFactory,B extends DefaultMapperFactory.MapperFactoryBuilder<F,B>>
extends Object

MapperFactoryBuilder provides an extensible Builder definition usable for providing your own Builder class for subclasses of DefaultMapperFactory.

See the defined DefaultMapperFactory.MapperFactoryBuilder below for example of how to subclass.

Author:
matt.deboer@gmail.com

Field Summary
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 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  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 Summary
DefaultMapperFactory.MapperFactoryBuilder()
          Instantiates a new MapperFactoryBuilder
 
Method Summary
abstract  F build()
           
 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 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
 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 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unenhanceStrategy

protected UnenhanceStrategy unenhanceStrategy
The UnenhanceStrategy configured for the MapperFactory


superTypeStrategy

protected SuperTypeResolverStrategy superTypeStrategy
The SuperTypeResolverStrategy configured for the MapperFactory


constructorResolverStrategy

protected ConstructorResolverStrategy constructorResolverStrategy
The ConstructorResolverStrategy configured for the MapperFactory


compilerStrategy

protected CompilerStrategy compilerStrategy
The CompilerStrategy configured for the MapperFactory


classMaps

protected Set<ClassMap<?,?>> classMaps
The class maps configured to initialize the MapperFactory


converterFactory

protected ConverterFactory converterFactory
The ConverterFactory configured for the MapperFactory


propertyResolverStrategy

protected PropertyResolverStrategy propertyResolverStrategy
The PropertyResolverStrategy configured for the MapperFactory


classMapBuilderFactory

protected ClassMapBuilderFactory classMapBuilderFactory
The ClassMapBuilderFactory configured for the MapperFactory


codeGenerationStrategy

protected CodeGenerationStrategy codeGenerationStrategy
The CodeGenerationStrategy configured for the MapperFactory


useBuiltinConverters

protected boolean useBuiltinConverters
The configured value of whether or not to use built-in converters for the MapperFactory


useAutoMapping

protected boolean useAutoMapping
The configured value of whether or not to use auto-mapping for the MapperFactory


mapNulls

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.

Constructor Detail

DefaultMapperFactory.MapperFactoryBuilder

public DefaultMapperFactory.MapperFactoryBuilder()
Instantiates a new MapperFactoryBuilder

Method Detail

self

protected abstract B self()
Returns:
an appropriately type-cast reference to this MapperFactoryBuilder

classMaps

public B classMaps(Set<ClassMap<?,?>> classMaps)
Set the class maps to be used in initializing this mapper factory

Parameters:
classMaps -
Returns:
a reference to this MapperFactoryBuilder

unenhanceStrategy

public B unenhanceStrategy(UnenhanceStrategy unenhanceStrategy)
Configure the UnenhanceStrategy to use with the generated MapperFactory

Parameters:
unenhanceStrategy -
Returns:
a reference to this MapperFactoryBuilder

superTypeResolverStrategy

public B superTypeResolverStrategy(SuperTypeResolverStrategy superTypeStrategy)
Configure the SuperTypeResolverStrategy to use with the generated MapperFactory

Parameters:
superTypeStrategy -
Returns:
a reference to this MapperFactoryBuilder

constructorResolverStrategy

public B constructorResolverStrategy(ConstructorResolverStrategy constructorResolverStrategy)
Configure the ConstructorResolverStrategy to use with the generated MapperFactory

Parameters:
constructorResolverStrategy -
Returns:
a reference to this MapperFactoryBuilder

converterFactory

public B converterFactory(ConverterFactory converterFactory)
Configure the ConverterFactory to use with the generated MapperFactory

Parameters:
converterFactory -
Returns:
a reference to this MapperFactoryBuilder

compilerStrategy

public B compilerStrategy(CompilerStrategy compilerStrategy)
Configure the CompilerStrategy to use with the generated MapperFactory

Parameters:
compilerStrategy -
Returns:
a reference to this MapperFactoryBuilder

propertyResolverStrategy

public B propertyResolverStrategy(PropertyResolverStrategy propertyResolverStrategy)
Configure the PropertyResolverStrategy to use with the generated MapperFactory

Parameters:
propertyResolverStrategy -
Returns:
a reference to this MapperFactoryBuilder

classMapBuilderFactory

public B classMapBuilderFactory(ClassMapBuilderFactory classMapBuilderFactory)
Configure the ClassMapBuilderFactory to use with the generated MapperFactory

Parameters:
classMapBuilderFactory -
Returns:
a reference to this MapperFactoryBuilder

useAutoMapping

public B useAutoMapping(boolean useAutoMapping)
Configure whether to use auto-mapping with the generated MapperFactory

Parameters:
useAutoMapping -
Returns:
a reference to this MapperFactoryBuilder

useBuiltinConverters

public B useBuiltinConverters(boolean useBuiltinConverters)
Configure whether to use built-in converters with the generated MapperFactory

Parameters:
useBuiltinConverters -
Returns:
a reference to this MapperFactoryBuilder

usedBuiltinConverters

@Deprecated
public B usedBuiltinConverters(boolean useBuiltinConverters)
Deprecated. use useBuiltinConverters(boolean) instead

Mis-spelled method signature

Parameters:
useBuiltinConverters -
Returns:
true if the built-in converters should be used

mapNulls

public B mapNulls(boolean mapNulls)
Configure whether to map nulls in generated mapper code

Parameters:
mapNulls -
Returns:
a reference to this MapperFactoryBuilder

getCodeGenerationStrategy

public 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.

Returns:
the CodeGenerationStrategy to be associated with this MapperFactory

build

public abstract F build()
Returns:
a new instance of the Factory for which this builder is defined. The construction should be performed via the single-argument constructor which takes in a builder; no initialization code should be performed here, as it will not be inherited by subclasses; instead, place such initialization (defaults, etc.) in the Builder's constructor.


Copyright © 2013 Glasnost. All Rights Reserved.