Results 1 to 7 of 7

Thread: Are there any object to object transformer configurations available or planned?

  1. #1

    Default Are there any object to object transformer configurations available or planned?

    Hi ,
    Spring integration is a great tool and we have been using it only recently. Kudos to that!

    One question or rather requirement, do we have any generic configuration based object to object transformer available? Again, I am not sure of the feasibility but would be good to have something like this:
    Code:
    <int:object-mapper source-class="com.abc.Test1" target-class="com.abc.Test2">
         <int:parameter source-field="aTest1" target-field="bTest1" expression="#this.toUpperCase()" />
         <int:parameter source-field="aTest1" target-field="bTest1" strategy-ref="someClass" strategy-method="someMethod" />
    </int:object-mapper>
    And this could probably be extended to the STS integration graph that could be used to load both the classes in memory to show a mapping diagram where a user could link the fields from the source to the target just by clicking and dragging.

    It could also provide for looping for collection objects using javascript or any other such languages.

    Again, apologize if this is far fetched .

    Thanks,
    Anoop
    Last edited by anoop2811; Feb 27th, 2012 at 06:22 PM.

  2. #2

    Default

    Hi Mark/Oleg,
    Do you have any suggestions around this requirement?

    Thanks,
    Anoop

  3. #3
    Join Date
    May 2009
    Posts
    18

    Default

    I'm currently using Dozer for object to object mapping (http://dozer.sourceforge.net/). It also provides mapping statistics which are exposed via JMX. The only downside based on your requirements is that there aren't any visual mapping tools.

    I would highly recommend checking it out.

    -brian

  4. #4

    Default

    Hey Brian,
    Thanks for this! Yes, dozer does look promising , will take a closer look.

    Regards,
    Anoop

  5. #5
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    Anoop,

    If you decide to go that direction and end up with something generic enough to be reusable, it might be a good candidate for contributing back to the framework.... IF you're willing and able.

    Please keep us posted on your progress either way.

    Thanks,
    Mark

  6. #6

    Default

    Brian,
    Did you by any chance notice any difference in performance by using Dozer?

    Anoop

  7. #7

    Default

    Yes, Mark, we would like to go that way to reduce the amount of java code to be written but would also like to take a look at the performance angle to make sure we dont end up with something 1000 times slower. Will update this thread when I have have something (which wont be soon due to other priorities). Would appreciate if you guys have any suggestions on this so that I can contribute the code back to the framework. The STS piece probably isnt my piece of cake to develop .

    Regards,
    Anoop

    Quote Originally Posted by Mark Fisher View Post
    Anoop,

    If you decide to go that direction and end up with something generic enough to be reusable, it might be a good candidate for contributing back to the framework.... IF you're willing and able.

    Please keep us posted on your progress either way.

    Thanks,
    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •