Mapping Objects to Objects

Moo maps an object or graph of objects to another object or set of objects while trying to stay as unintrusive as possible and easy-to-use. Moo makes it possible to create quick copies and data transfer objects.

There are a lot of ways you could use Moo -- to create data transfer objects, to work as an anti-corruption layer, to help summarize an object graph before serializing to XML or JSON. Examples of Moo at work can be found in the automated tests (for moo-core, moo-mvel).

The simplest examples of using Moo might look something like these: UserDto.class ).from( currentUser ); UserDto.class ).fromEach( selectedUsers );

Update.from( userDto ).to( currentUser );
Get It Learn More News Code