#24 Field element should have a create-method attribute

closed
None
5
2006-01-17
2005-12-21
No

I was trying to avoid creation of factory objects since
i felt that it should part of the frame work. I also
feel that you should give some tag for the creation of
the instance in case some one has a method to call for
the creation instead of the default constructor. Lot of
people use some static methods within the Class to
create the instances as opposed to using the default
constructor.

Good point. Castor has a similar feature on their field
element called 'create-method'. I will create a feature
request and either provide a patch for v15 branch or
add this to the v20 branch slated for a few weeks from
now. This should be relatively simple so maybe I can
have it in a week or so and provide a patch and merge
it into our performance release.

Discussion

  • Franz Garsombke

    Franz Garsombke - 2005-12-22

    Logged In: YES
    user_id=550744

    I have also added this at the class level.

    examples:

    <mapping>

    <classA>net.sf.dozer.util.mapping.vo.TestObject</classA>

    <classB>net.sf.dozer.util.mapping.vo.TestObjectPrime</classB>

    <field>
    <A>createMethodType</A>
    <B
    createMethod="createMethod">createMethodType</B>
    </field>

    </mapping>

    <mapping>
    <classA
    createMethod="createMethod">net.sf.dozer.util.mapping.vo.InsideTestObject</classA>

    <classB>net.sf.dozer.util.mapping.vo.InsideTestObjectPrime</classB>

    <field>
    <A>label</A><!-- converting String to String
    by name only -->
    <B>labelPrime</B>
    </field>

    </mapping>

    This code has been checked into CVS on the v15 branch and
    merged with the v20 branch. In addition to the code you will
    also need the latest DTD file under {dozer_home}/xdocs/dtd.

    I have attached the patched code.

     
  • Franz Garsombke

    Franz Garsombke - 2006-01-11
    • status: open --> pending
     
  • Franz Garsombke

    Franz Garsombke - 2006-01-17
    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks