ma.glasnost.orika.impl.generator
Interface CodeGenerationStrategy

All Known Implementing Classes:
DefaultCodeGenerationStrategy

public interface CodeGenerationStrategy

CodeGenerationStrategy is an encapsulation of the collection of individual field mapping scenarios for which code is generated. It allows reordering, overriding, adding and removing the scenarios individually as desired.

Author:
matt.deboer@gmail.com

Nested Class Summary
static class CodeGenerationStrategy.Position
           
 
Method Summary
 void addAggregateSpecification(AggregateSpecification spec, CodeGenerationStrategy.Position relativePosition, Class<AggregateSpecification> relativeSpec)
          Convenience method to add an AggregateSpecification at a relative position with respect to another AggregateSpecification, or the list in general
 void addSpecification(Specification spec, CodeGenerationStrategy.Position relativePosition, Class<Specification> relativeSpec)
          Convenience method to add a specification at a relative position with respect to another Specification, or the list in general
 List<AggregateSpecification> getAggregateSpecifications()
           
 List<Specification> getSpecifications()
           
 void setMapperFactory(MapperFactory mapperFactory)
          Set the MapperFactory on this CodeGenerationStrategy
 

Method Detail

setMapperFactory

void setMapperFactory(MapperFactory mapperFactory)
Set the MapperFactory on this CodeGenerationStrategy

Parameters:
mapperFactory - the MapperFactory to apply

addSpecification

void addSpecification(Specification spec,
                      CodeGenerationStrategy.Position relativePosition,
                      Class<Specification> relativeSpec)
Convenience method to add a specification at a relative position with respect to another Specification, or the list in general

Parameters:
spec - the specification to add
relativePosition - the relative position
relativeSpec - the other relative spec (for Positions BEFORE, AFTER, or IN_PLACE_OF)

getSpecifications

List<Specification> getSpecifications()
Returns:
the defined specifications

addAggregateSpecification

void addAggregateSpecification(AggregateSpecification spec,
                               CodeGenerationStrategy.Position relativePosition,
                               Class<AggregateSpecification> relativeSpec)
Convenience method to add an AggregateSpecification at a relative position with respect to another AggregateSpecification, or the list in general

Parameters:
spec - the specification to add
relativePosition - the relative position
relativeSpec - the other relative spec (for Positions BEFORE, AFTER, or IN_PLACE_OF)

getAggregateSpecifications

List<AggregateSpecification> getAggregateSpecifications()
Returns:
the defined aggregate specifications


Copyright © 2013 Glasnost. All Rights Reserved.