Menu

Java code generation

2008-03-11
2013-05-02
  • Julien Roux

    Julien Roux - 2008-03-11

    Hello.

    I am using Dozer to map objects in my application, but I have to map a big amount of objects and it can take a long time to convert all these objects. So I would like to know if it is possible to generate Java classes, from Dozer and the mapping XML files, that would do the mapping instead of doing it at run time with Dozer. That would be much faster as it would not use the Java reflection.

    Thanks for you answers.

     
    • Franz Garsombke

      Franz Garsombke - 2008-03-12

      We have always wanted to build that but just never got around to it :)

      Thanks for looking.

      Franz

       
    • Emmanuel Caruana

      I have the following simple example:

      A client object  TransferObject
      ID
      Name
      Address
      AccountNumber

      List of services subscribed all of these fields are boolean
      Mail  = true or fale
      Dailup = true or fale
      WebHosting = true or fale
      FTP = true or fale

      And I have the following Data object:

      1. ClientDataObject
      ID
      Name
      Address
      AcccountNumber

      2. MailServiceDataObject
      MailserviceID
      ClientID
      AccountNumber

      3. DailUpDataObject
      DailUpServiceID
      ClientID
      AccountNumber

      4. WebHostingServiceDataObject
      WebHostingServiceID
      ClientID
      AccountNumber

      5. FTPServiceDataObject
      FTPServiceID
      ClientID
      AccountNumber

      What I want to do is based on the values of the folliwng boolean in the Transfer Object:
      Mail  = true or fale
      Dailup = true or fale
      WebHosting = true or fale
      FTP = true or fale
      I create or not create the DataObject respectivetly. 

      Can you help how it can b achieved by the custom convertor?

       

Log in to post a comment.

MongoDB Logo MongoDB