incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: How do I specify the graffito jcr mapping for classes that extend ArrayList
Date Fri, 01 Jun 2007 07:50:17 GMT
If you have time, I will add add a new unit test with an ArrayList (hope for
this wk).

br,
Christophe


On 5/31/07, rajab57 <rajalakshmi@gmail.com> wrote:
>
>
> Hi,
>
> Thanks for the reply.
>
> I will refer to the jackrabbit project in future. I did not realize that
> the
> process has happened.
> I looked at the example for HashMap. And I have implemented the case of
> ArrayList, Set etc.
> In this scenario this ElementsList extends ArrayList. And I was not sure
> how
> I can specify that mapping.
>
> Thanks again,
> Raji
>
>
> Christophe Lombart wrote:
> >
> > The jcr mapping tools has been moved into the Jackrabbit project (
> > http://jackrabbit.apache.org). I advise you to use the Jackrabbit
> mailing
> > list.
> >
> > FYI, ArrayList are supportedd by default.
> >
> > If you want to support your own collection/map class :
> > 1/ your collection/map class have to implement the ManagableCollection
> > interface.
> > 2/ You have to specify the collection class name in the mapping file.
> >
> > We have a unit test with an specific HashMap. That's exactly the same
> for
> > collection like ArrayList, ...
> > * See the class HashMapElement which implement the interface
> > ManageableCollection
> > * See the unit test HashMapTest.
> > * Check in the mapping file "jcrmapping.xml" the mapping descriptor for
> > the
> > class o.a.j.ocm.testmodel.hashmap.Main which contains a descriptor based
> > on
> > the HashMapElement class.
> >
> > HTH
> > Christophe
> >
> >
> > On 5/31/07, rajab57 <rajalakshmi@gmail.com> wrote:
> >>
> >>
> >>
> >> Example
> >>
> >> import java.util.ArrayList;
> >> import java.util.ListIterator;
> >>
> >> public class MainClass {
> >>    private ElementsList elements;
> >>
> >> }
> >>
> >> public class ElementsList extends ArrayList<Elements>  {
> >>   private static final long serialVersionUID = 1L;
> >>
> >> }
> >>
> >>
> >> public class Element {
> >>    private String name ;
> >>    private String id ;
> >>
> >> }
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-do-I-specify-the-graffito-jcr-mapping-for-classes-that-extend-ArrayList-tf3848661.html#a10901203
> >> Sent from the Graffito - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-do-I-specify-the-graffito-jcr-mapping-for-classes-that-extend-ArrayList-tf3848661.html#a10901887
> Sent from the Graffito - Dev mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message