Orika simpler, lighter and faster Java bean mapping

User Guide

Important!

This guide is (like Orika) a work in progress; any feedback in the way of suggestions or questions or problems can be posted to our project issues site, currently hosted at Google Code

About

As developers we have to provide solutions to business problems, and we want to use the time in our disposition to do what really matter. In our days, enterprise applications became more and more complex, with a lot of architecture and design constrains.
Design constraints that will produce a considerable amount of mechanical work. A lot of Open Source projects put in our hands some great tools to face such complexity, such Spring, Guice, Hibernate, Wicket, ... and we have a lot of options available to solve each particular part of the overall problem. However, with all of these different tools/frameworks/libraries, it is common to find that we need to convert objects into different formats to accommodate different APIs, or we may even need to convert formats between different architectural layers of our own for design reasons; to accomplish this, we are left to the rather boring task of writing mapping code to copy the values from one type to another.

In a medium to large project, such mapping code can reach a considerable effort of mechanical (boring) work which can be difficult to maintain, test, and debug.

Approach

Orika attempts to perform this tedious work for you, with little measurable tradeoff on performance

It will automatically collect meta-data of your classes to generate mapping objects which can be used together to copy data from one object graph to another, recursively. Orika attempts to provide many convenient features while remaining relatively simple and open -- giving you the possibility to extend and adapt it to fit your needs.

Also

We could use your help!
Most all kinds of contribution are welcomed; feature requests, patches, bug reports, test cases, benchmarks, blog posts, and stories of how Orika helped you (or even where it could have been more helpful)-- all are welcomed.

Topics

Introduction
getting started with Orika
Declarative Mapping Configuration
using the fluent-style ClassMapBuilder API
Advanced Mapping Configurations
beyond the basics of ClassMapBuilder API
MapperFactory Configuration
settings to customize default mapping behavior
Custom Converters
explicitly defining conversion from one type to another
Object Factories
customize object instantiation
Custom Mappers
explicitly define how properties are copied from one object to another
Filters
customize dynamic mapping behavior
Converters, Mappers, and ObjectFactories
when to choose one over the others
Extending Orika
advanced customizations
Performance Tuning
recommendations for optimal performance
Troubleshooting
what to do when something goes wrong
FAQ
frequently asked questions
Examples
cooking with Orika