Ara Abrahamian said: > Hi, > Note: ejbdoclet is dead, please use xdoclet's mailing lists > (unfortunately we put wrong address in docs). And please upgrade to > latest code from cvs, it's way better than the 1.0.1 version. We'll > release 1.1 very soon. > I am, I am (using cvs latest, that is)
> Regarding orion support, I'm the guy who added orion support but I'm > not using orion anymore (sadly). So I'll be glad if someone could > maintain it hereafter officially. > Once/if I understand how it all works, I wouldn't mind maintaining it (big caveat being the once/if) >> In orion-cmp-mapping.j, there is a pushClass with the value being the > type >> parameter (in my case, java.lang.String). Then it does a >> forAllPersistentFields. Now, won't this always be empty for a String? >> Therefore, doesn't this mean that the set and collection mappings will >> ONLY >> work if the type is another EJB? > > Well you set @orion:persistence type="java.lang.String" for the field > getter. So it will pushclass java.lang.String and try to iterate over > persistent fields of java.lang.String and it doesn't find anything and > no <cmp-field-mapping/> is generated. You were right. What we should do > is to put an if/else there: > > <XDtType:ifIsOfType value="<XDtMethod:methodTagValue > tagName='orion:persistence' paramName='type'/>" > type="javax.ejb.EJBObject" extent="concrete-type"> > merge as it is now > else ifIsNotOfType > <cmp-field-mapping blabla/> > Ok, I tried this approach, but it looks like ifIsOfType only works against the current class, is this by design? In TypeTagsHandler.ifIsOfType_Impl() value can only be return-type, null, or class. Anything else will blow up since curr_type will be null and an NPE will be thrown (btw, IMHO MUCH of code needs null checks, it's way too easy to have things blow up with nothing more helpful than an NPE!). Would it make sense to have ifIsOfType_Impl try to get the Type for the value attribute, and failing that, using reflection to perform the test? I guess things could get working by doing the pushClass (so I can perform the type check), except that in the 'not' case, I'd want to pop the class (close the pushClass?!) and act on something set within the pushClass! The sequence would be something like: pushClass->check if not EJBObject -> popClass -> get PK field and add it to the dd...so..any ideas on how to accomplish this? Apologies if it's trivial stuff, it's my second day and I'm still getting my feet wet (well, trying to at least) > I'm not interested in implementing it myself (and also test it), should > be very trivial for you (specially in IDEA and OS X) :o) > Anyway check out core/docs/ide/ there's a set of IDEA live templates > there for Xdoclet ;-) > Hehe, I'll plug those templates in, soon as I know I can get it all working! _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
