Title: ValueObjects for beans with multiple pk-fields

Hi!

I have been using xdoclet dataobjects for my entity beans. This has worked well, but I am now trying to move to the valueobject support since this is more powerful.

However, I have encountered some problems with beans that have multiple PK-fields. The generated value-object will not compile, since it tries to call the PK constructor with the wrong number of arguments.(one instead of two)

Specifically, I have a bean SubSystemBean with the following get/set definitions(among others):

    /**
     * @ejb:pk-field
     * @ejb:persistent-field
     * @jboss:column-name name="sub_system_name"
     */
    public abstract String getSubSystemName();
    public abstract void setSubSystemName( String subSystemName );
  

    /**
     * @ejb:pk-field
     * @ejb:persistent-field
     * @jboss:column-name name="system_name"
     */
    public abstract String getSystemName();
    public abstract void setSystemName(String systemName);

The generated SubSystemPK.java contains the following constructor:

  public SubSystemPK( java.lang.String subSystemName,java.lang.String systemName )
   {
      this.subSystemName = subSystemName;
      this.systemName = systemName;
   }

However, the generated value object SubSystemValue.java contains the following line:

    pk = new com.ca.slm.database.SubSystemPK(this.getSystemName());

which fails during compilation.

This worked when I used the databean ant task. I am using xdoclet 1.1.2. Unfortunately, I am unable to download the cvs repository files so I have not testet this using the CVS source.

Any help would be gratefully appreciated. Also, are there any documentation, examples available for the valueobject task? I have not found any in the 1.1.2 distributions.

Regards
Rolf Woll
 

Reply via email to