Design pattern for converting one model to another model

design-patterns, java

Solution

Either Adapter or facade pattern should solve your problem:

Adapter: http://www.youtube.com/watch?v=TriX8OiEhOU

Facade: http://www.youtube.com/watch?v=WLjvNpP6yeQ

Problem

Basically, I have a number of objects in my application and I have to convert them to another third party objects before sending the request. On receiving the response I have to convert these objects back to objects supported by my application. What pattern can I use for converting one model object to another in Java?

Original source

Related problems