Hello,

I got a little problem using xdoclet.
What I want to do is the following :

I have an EJB with several attributes and several business methods. I use XDoclet to generate automaticaly a value object with the same attributes as the EJB. That works fine and until there I have no problem.
But the next thing I want to do is let xdoclet generating an attribute in the value object wich corresponds to the result of a business method of my ejb. I have in my EJB for example a method "getTotal()", which makes some complex calculations and returns a "double" as a result. I would like that xdoclet generates an attribute in the value-object to store the result of this businessmethod. How can I specify this with some tags?
My businessmethod in my ejb is for example :

/**
     * @ejb.interface-method
     */
    public double getTotal( )
    {
        double total = 0;
        Iterator it = getMenuItems( ).iterator( );
        while ( it.hasNext( ) )
        {
            total += ( ( MenuItemLocal ) it.next( ) ).getTotal( );
        }

        return total;
    }


Which xdoclet-tag can I use to let xdoclet generate a "total" attribute in my corresponding Value-object?

Thanx in advance!!!

Olivier Jennes

Reply via email to