Title: [Xdoclet-user] Collection class not imported - VO's won't compile

Here is the input.  Again, this works fine with xdoclet 1.2b2, but under 1.2.2rc1 the value object won’t compile due to a missing import for Collection.  Needless to say, the Collection class is *not* fully qualified in the VO generated for this class by 1.2.2r1.  We would very much like to use the latest version of xdoclet for hibernate support purposes, but this issue currently has us dead in the water since our VOs will no longer compile.  The only thing I saw regarding this was this entry in the changelog.  Does this mean that the Collection class must be fully qualified in my bean now?  This would be unfortunate as it would break xdoclet 1.2+ backwards compatibility with previous versions.

2004-04-21 09:23:14

Heiko Rupp

modules/ejb/src/META-INF/xtags.xml v 1.43

Update documentation of @ejb.value-object wrt. type of possible Collection types. Especially that those need to be fully qualified. After a suggestion from Lars Rohleder [l.rohleder at tallence.de]

Any insight is greatly appreciated.  Thanks.

 

            Edward

 

 

Input:

 

package com.foo.management.alerts;

 

import com.foo.utils.logging.Logger;

import javax.ejb.*;

import java.util.*;

 

/**

 * Describes a set of levels that can be alerted on. Basically acts as

 * a container of [EMAIL PROTECTED] AlertLevelLocal} that can be chosen from the

 * interface when creating an alert rule.

 *

 * @version 1.0 05/10/2004

 *

 * @zpm:genall

 *

 * @ejb.bean name="AlertLevelSet"

 *           local-jndi-name="zpm_management_ejb_AlertLevelSet"

 *           type="CMP"

 *           cmp-version="2.x"

 *           view-type="local"

 *           primkey-field="iD"

 *

 * @ejb.persistence  table-name="rep_meta_alertLevelSet"

 * @jboss.container-configuration  name="ZPM Cached CMP EntityBean"

 * @jboss.persistence create-table="false"  remove-table="false"

 *

 * @ejb.finder

 *      signature="java.util.Collection findAll()"

 *      query="SELECT OBJECT(r) FROM AlertLevelSet AS r"

 *

 * @ejb.transaction     type="Required"

 * @ejb.value-object    name="AlertLevelSet" match="*"

 * @ejb.util            generate="physical"

 */

abstract public class AlertLevelSetBean implements EntityBean

{

    private static final String CLASS_NAME = AlertLevelSetBean.class.getName();

    private static final Logger logger     = Logger.getLogger(CLASS_NAME);

 

    /**

     * @ejb.persistence column-name="setID"

     * @ejb.pk-field

     */

    abstract public Integer getID();

    abstract public void setID(Integer id);

 

    /**

     * @return  String display name of the level

     *

     * @ejb.persistence column-name="displayName"

     * @ejb.interface-method

     */

    abstract public String getDisplayName();

    /** @ejb.interface-method */

    abstract public void setDisplayName(String name);

 

    /**

     * @return  int sort order for display purposes

     *

     * @ejb.persistence column-name="sortOrder"

     * @ejb.interface-method

     */

    abstract public int getSortOrder();

    /** @ejb.interface-method */

    abstract public void setSortOrder(int order);

 

    /**

     * @ejb.relation name="AlertLevelSet-AlertLevel"

     *               role-name="AlertLevelSet-hasN-AlertLevels"

     *               target-role-name="AlertLevel-BelongsToMany-AlertLevelSets"

     *               target-ejb="AlertLevel"

     *               target-cascade-delete="no"

     *               target-multiple="yes"

     *

     * @ejb.value-object compose="com.foo.management.alerts.AlertLevelVO"

     *                   compose-name="Level"

     *                   members="com.foo.management.alerts.AlertLevelLocal"

     *                   members-name="AlertLevelVO"

     *                   relation="external"

     *                   type="Collection"

     *

     * @jboss.relation          related-pk-field="iD"

     *                          fk-column="levelID"

     * @jboss.target-relation   related-pk-field="iD"

     *                          fk-column="setID"

     * @jboss.relation-mapping  style="relation-table"

     * @jboss.relation-table    table-name="rep_meta_alertLevelSetToLevel"

     *                          create-table="false"

     *                          remove-table="false"

     *                          row-locking="false"

     * @ejb.interface-method

     */

    abstract public Collection getLevels();

    /** @ejb.interface-method */

    abstract public void setLevels(Collection levels);

 

 

 

    /**

     * @ejb.create-method view-type="local"

     */

    public Integer ejbCreate(AlertLevelSetVO set) throws CreateException

    {

        setID(set.getID());

        setDisplayName(set.getDisplayName());

        setSortOrder(set.getSortOrder());

        return null;

    }

 

    /**

     *  trying post create for setting the vo since we have relations...

     */

    public void ejbPostCreate(AlertLevelSetVO set) throws CreateException

    {

        setAlertLevelSetVO(set);

    }

 

    /** @ejb.interface-method  */

    public abstract AlertLevelSetVO getAlertLevelSetVO();

 

    /** @ejb.interface-method  */

    public abstract void setAlertLevelSetVO(AlertLevelSetVO setVO);

}

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rupp, Heiko
Sent: Monday, October 18, 2004 1:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [Xdoclet-user] Collection class not imported - VO's won't compile

 

As far as I recall are all Collection classes fully qualified.

 

There was report some time ago about this behaviour, but I think it is solved.

 

Hm. Can you show your input?

 


Von: [EMAIL PROTECTED] im Auftrag von Gemar, Edward
Gesendet: Mo 18.10.2004 18:24
An: [EMAIL PROTECTED]
Betreff: [Xdoclet-user] Collection class not imported - VO's won't compile

Hi all,
        I've just upgraded to 1.2.2rc1 from 1.2b2 (for hibernate support) and now my EJB value objects won't compile because the Collection class isn't imported.  This issue was brought up in April, but I haven't seen a JIRA against it and it's obviously a problem in latest release candidate.  This is a major issue for us that breaks the build.  Any ideas or workarounds?

        Thanks,

                Edward


From: Lars Rohleder <[EMAIL PROTECTED]>
Re: AW: Bug in xDoclet 1.2 final?  
2004-04-16 00:29
 Well, in version 1.2 (final) java.util.Collection doesn"t get imported
 nor is this class fully qualified in my value objects.

 And on JIRA I can"t find the bug (today JIRA seems to work).

 Lars


 On Thu, 2004-04-15 at 22:19, Rupp, Heiko wrote:
 > There is an item in Jira open wrt. this.
 > The current CVS version fully qualifies the collections as
 > java.util.Collection and does
 > not need the import.
 > I can"t really comment on 1.2 though.
 > 
 >   Heiko
 >
 > ______________________________________________________________________
 > Von: [EMAIL PROTECTED] im Auftrag von Lars
 > Rohleder
 > Gesendet: Do 15.04.2004 21:19
 > An: [EMAIL PROTECTED]
 > Betreff: [Xdoclet-user] Bug in xDoclet 1.2 final?
 >
 >
 >
 > Hi folks,
 >
 > I couldn"t find anything on the web or on this mailing list relating
 > this topic so I hope this hasn"t been asked earlier.
 >
 > After updating from xdoclet1.2b3 to xdoclet1.2 our project can"t be
 > compiled any more. It seems that the abstract value objects generated
 > from our entity beans are missing the import statement for
 > java.util.*.
 > Since we"re using collections I get a lot of error messages from ant.
 >
 > Using beta3 still works, 1.2.0 doesn"t.
 > I don"t think the taskdef or path definitions in our build.xml are
 > wrong. I didn"t change anything and upgrading to version 1.2.0 was
 > done
 > through changing the symbolic link to xdoclet to the new directory.
 > (And
 > of course I use this link in ant too.)
 >
 > Any suggestions?
 >
 > Lars
 >
 >
 > By the way: Where can I post bugs? Neither bug tracker on
 > SourceForge.net (closed) nor JIRA (error 404) will work.
 >
 >
 >
 > -------------------------------------------------------
 > This SF.Net email is sponsored by: IBM Linux Tutorials
 > Free Linux tutorial presented by Daniel Robbins, President and CEO of
 > GenToo technologies. Learn everything from fundamentals to system
 > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
 > _______________________________________________
 > xdoclet-user mailing list
 > [EMAIL PROTECTED]
 > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
 >
 >
 >



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to