Re: Documentation error/ API consistency / Commons Collections Bug

From: Mike Kienenberger (mkienen..mail.com)
Date: Thu Apr 05 2007 - 09:53:33 EDT

  • Next message: jerome moliere: "Re: Documentation error/ API consistency / Commons Collections Bug"

    DataRow is a subclass of HashMap, so there's no problem with using
    Map. You only need to typecast the result to DataRow if you want to
    use one of the methods specific to DataRow, or if you call a method
    that requires a DataRow.

    On 4/5/07, jerome moliere <jerome.molier..mail.com> wrote:
    > Hi,
    > just for users conveniance I want to signal one problem in the DataRow
    > documentation:
    >
    > Map row = (Map)artistRows.get(0);
    >
    > // convert row to an artist
    > Artist artist = (Artist)ctxt.objectFromDataRow("Artist", row); //-->
    > APi changes here in 2.0!!!
    >
    >
    > Using datarows I wondered about the interest of returning from returning a
    > Map while later usages will reclaim a DataRow instance
    > (like the method DataContext.createObjectFromRow() )
    >
    > At last but not least I want to signal that it seems that there's a binary
    > incompatibility with Commons Collections 2.1.1 (as stated in the docs from
    > this project) so using these features require upgrade to the 3.2 commons
    > collections library...
    >
    > Hope this helps
    > jerome
    >
    > --
    > Jerome Moliere - Mentor/J
    > http://romjethoughts.blogspot.com/
    > auteur Eyrolles
    >



    This archive was generated by hypermail 2.0.0 : Thu Apr 05 2007 - 09:54:06 EDT