哈哈 我这两天就为这个烦着 终于解决了Lomboz不支持直接设但是你可以通过修改 xDoclet的标签实现
写一个class level 的xDoclet 的标签@ ejb.pk class="*****PK"
然后在每个cmp field 的方法前写一个 method level的标签
@ ejb.pk-field部分代码如下
....
*
* @ejb.persistence
* table-name="results"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM resultSchema as a"
* signature="java.util.Collection findAll()"
*
* @ejb.pk class="csc.resultPK"
*--
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.finder-method-jdbc-mapping method-name="findAll"
* jdbc-where-clause=""
* @jonas.jdbc-mapping jndi-name="j2ee_project"
* jdbc-table-name="results"
*
*--
* <!-- end-xdoclet-definition -->
* @generated
**/
public abstract class resultBean implements javax.ejb.EntityBean {....... /**
*
*
* <!-- begin-user-doc -->
* CMP Field sno
*
* Returns the sno
* @return the sno
*
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="sno"
* jdbc-type="VARCHAR"
* sql-type="number"
* read-only="false"
*
* @ejb.pk-field
* @ejb.interface-method
*
* --
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.cmp-field-jdbc-mapping field-name="sno"
* jdbc-field-name="sno"
*
* --
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract java.lang.Integer getSno(); /**
* <!-- begin-user-doc -->
* Sets the sno
*
* @param java.lang.Integer the new sno value
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
* @ejb.interface-method
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract void setSno(java.lang.Integer sno); /**
*
*
* <!-- begin-user-doc -->
* CMP Field cno
*
* Returns the cno
* @return the cno
*
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="cno"
* jdbc-type="VARCHAR"
* sql-type="number"
* read-only="false"
* @ejb.pk-field
*
* @ejb.interface-method
*
* --
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.cmp-field-jdbc-mapping field-name="cno"
* jdbc-field-name="cno"
*
* --
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract java.lang.Integer getCno(); /**
* <!-- begin-user-doc -->
* Sets the cno
*
* @param java.lang.Integer the new cno value
* <!-- end-user-doc -->
* <!-- begin-xdoclet-definition -->
* @ejb.interface-method
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract void setCno(java.lang.Integer cno);楼主给分!
写一个class level 的xDoclet 的标签@ ejb.pk class="*****PK"
然后在每个cmp field 的方法前写一个 method level的标签
@ ejb.pk-field部分代码如下
....
*
* @ejb.persistence
* table-name="results"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM resultSchema as a"
* signature="java.util.Collection findAll()"
*
* @ejb.pk class="csc.resultPK"
*--
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.finder-method-jdbc-mapping method-name="findAll"
* jdbc-where-clause=""
* @jonas.jdbc-mapping jndi-name="j2ee_project"
* jdbc-table-name="results"
*
*--
* <!-- end-xdoclet-definition -->
* @generated
**/
public abstract class resultBean implements javax.ejb.EntityBean {....... /**
*
*
* <!-- begin-user-doc -->
* CMP Field sno
*
* Returns the sno
* @return the sno
*
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="sno"
* jdbc-type="VARCHAR"
* sql-type="number"
* read-only="false"
*
* @ejb.pk-field
* @ejb.interface-method
*
* --
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.cmp-field-jdbc-mapping field-name="sno"
* jdbc-field-name="sno"
*
* --
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract java.lang.Integer getSno(); /**
* <!-- begin-user-doc -->
* Sets the sno
*
* @param java.lang.Integer the new sno value
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
* @ejb.interface-method
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract void setSno(java.lang.Integer sno); /**
*
*
* <!-- begin-user-doc -->
* CMP Field cno
*
* Returns the cno
* @return the cno
*
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="cno"
* jdbc-type="VARCHAR"
* sql-type="number"
* read-only="false"
* @ejb.pk-field
*
* @ejb.interface-method
*
* --
* This is needed for JOnAS.
* If you are not using JOnAS you can safely remove the tags below.
* @jonas.cmp-field-jdbc-mapping field-name="cno"
* jdbc-field-name="cno"
*
* --
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract java.lang.Integer getCno(); /**
* <!-- begin-user-doc -->
* Sets the cno
*
* @param java.lang.Integer the new cno value
* <!-- end-user-doc -->
* <!-- begin-xdoclet-definition -->
* @ejb.interface-method
* <!-- end-xdoclet-definition -->
* @generated
*/
public abstract void setCno(java.lang.Integer cno);楼主给分!
解决方案 »
- hibernate持久化问题,公司老代码维护好多年了,限制比较多,大侠请进
- 找书
- 求解决org.springframework.beans.factory.BeanCreationException
- 关于struts2中web.xml配置的问题(急)
- apahce mina的客户端可以直接用socket吗?
- axis调用.net 的webservice问题
- sql jsp 连接错误
- list = (ArrayList)request.getAttribute("slist")得不到值?
- 散分 求救 在线等 !weblogic8+struts的mapping问题
- 这两种post的传参方式,那个性能会更好一些
- tomcat首页显示问题
- 内存溢出
就可以在 ejbsrc 中看到 ****PK.java了
这时你就会觉着这个世界好美丽啊!
多好的太阳啊 虽然有点热~~~~~ ^o^如果 没有解决给我写信 reene2008 # gmail.com把 # 改成 @