Hi,
I'm trying to create multiple value objects for an entity bean, but am
having problems getting xdoclet to generate the correct code for the
cmr values. I'm wanting to create one value object that contains
another value object with all of the information from the ejb
referenced by the cmr, and another value object that contains a much
smaller value object for the same relation.
The following is my code:
**************
package RSVPA.ejb.entity;
import javax.ejb.CreateException;
/**
* @ejb.bean type="CMP"
* name="Analyst"
* jndi-name="ejb/RSVPA/Analyst"
* local-jndi-name="ejb/RSVPA/AnalystLocal"
* primkey-field="participantIID"
*
[EMAIL PROTECTED] table-name="ANALYST"
* @ejb.finder signature="Collection findAll()"
*
* @ejb.value-object
* match="1"
*
* @ejb.value-object
* name="ListAnalyst"
* match="basic_list"
*
*/
public abstract class AnalystBean implements javax.ejb.EntityBean{
/**
* @ejb.create-method
*/
public Integer ejbCreate(Integer IID) throws CreateException{
setParticipantIID(IID);
return null;
}
public void ejbPostCreate(Integer IID){}
/**
* @ejb.create-method
*/
public Integer ejbCreate(ParticipantLocal pLocal) throws
javax.ejb.CreateException {
setParticipantIID(pLocal.getIID());
return null;
}
public void ejbPostCreate(ParticipantLocal pLocal){ }
/**
* @ejb.value-object
* compose="RSVPA.ejb.entity.ParticipantValue"
* compose-name="ParticipantInfo"
* members="RSVPA.ejb.entity.ParticipantLocal"
* members-name="ParticipantValue"
* relation="external"
* match="1"
*
* @ejb.value-object
* compose="RSVPA.ejb.entity.ListParticipantValue"
* compose-name="ParticipantInfo"
* members="RSVPA.ejb.entity.ParticipantLocal"
* members-name="ListParticipantValue"
* relation="external"
* match="basic_list"
*
* @ejb.interface-method view-type="local"
* @ejb.relation
* name="Analyst-Participant"
* role-name="AnalystisParticipant"
*
* @jboss.relation
* related-pk-field="IID"
* fk-column="Participant_IID"
*/
public abstract ParticipantLocal getParticipant();
public abstract void setParticipant(ParticipantLocal pLocal);
/**
* @ejb.value-object
* match="basic_list"
*
* @ejb.value-object
* match="1"
*
* @ejb.persistence column-name="Participant_IID"
*/
public abstract Integer getParticipantIID();
public abstract void setParticipantIID(Integer participantIID);
/**
* @ejb.persistence column-name="Affiliation"
* @ejb.interface-method
* @ejb.value-object
* match="1"
*/
public abstract String getAffiliation();
/**
* @ejb.interface-method
*/
public abstract void setAffiliation(String affiliation);
/**
* @ejb.persistence column-name="Position"
* @ejb.interface-method
* @ejb.value-object
* match="1"
*/
public abstract String getPosition();
/**
* @ejb.interface-method
*/
public abstract void setPosition(String position);
/**
* @ejb.persistence column-name="Description"
* @ejb.interface-method
* @ejb.value-object
* match="1"
*/
public abstract String getDescription();
/**
* @ejb.interface-method
*/
public abstract void setDescription(String description);
/**
* @ejb.interface-method view-type="local"
* @ejb.relation
* name="Analyst-Advisory"
* role-name="AnalystHasAdvisories"
*
*
*/
public abstract java.util.Collection getAdvisories();
/**
* @ejb.interface-method view-type="local"
*/
public abstract void setAdvisories(java.util.Collection advisories);
/**
* @ejb.interface-method
*/
public abstract AnalystValue getAnalystValue();
/**
* @ejb.interface-method
*/
public abstract ListAnalystValue getListAnalystValue();
}
********************
Xdoclet is creating the ListAnalystValue object with a reference to
the ParticipantValue object rather than the ListParticipantValue
object.
Does anyone know why this is happenning and better yet, what I can do to fix it?
Thanks,
Andy
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id281&op=click
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user