给你一个使用xdoclet的例子,customer:leaveword=1:nLeaveWordEJB.java...
//==========================================
// CMR fields
//==========================================
/**
* @ejb.interface-method
* @ejb.relation
* name="leaveword-customer"
* role-name="leaveword-belongs_to-customer"
* target-ejb="Customer"
* target-role-name="customer-has-leavewords"
* target-multiple="yes"
*
* @jboss.relation
* fk-column="customerUId_fk"
* related-pk-field="customerUId"
*
* @weblogic.column-map
* foreign-key-column="customerUId_fk"
*/
public abstract CustomerLocal getCustomer();
/**
* @ejb.interface-method
*/
public abstract void setCustomer( CustomerLocal customer ); CustomerEJB.java由于是1;n所以在CustomerEJB中不用额外的xdoclet标记
//==========================================
// CMR fields
//==========================================
/**
* @ejb.interface-method
* @ejb.relation
* name="leaveword-customer"
* role-name="leaveword-belongs_to-customer"
* target-ejb="Customer"
* target-role-name="customer-has-leavewords"
* target-multiple="yes"
*
* @jboss.relation
* fk-column="customerUId_fk"
* related-pk-field="customerUId"
*
* @weblogic.column-map
* foreign-key-column="customerUId_fk"
*/
public abstract CustomerLocal getCustomer();
/**
* @ejb.interface-method
*/
public abstract void setCustomer( CustomerLocal customer ); CustomerEJB.java由于是1;n所以在CustomerEJB中不用额外的xdoclet标记
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货