From: Hanson, M. <Mat...@us...> - 2003-05-15 14:54:45
|
Thought I would let y'all see what the current bean implementation looks like. Any suggestions would be appreciated... /** * * // begin class level xdoclet attributes * @ejb:bean name="account/accountHolderBean" * display-name="General account information" * local-jndi-name="homebrew/ejb/entity/accountHolderBean" * view-type="local" * type="CMP" * schema="account" * * @ejb:home generate="local" * * @ejb:interface generate="local" * * @ejb:pk extends="java.lang.Object" * * @ejb:transaction type="Required" * * // begin jboss xdoclet attributes * @jboss:datasource name="DefaultDS" * * @jboss:table-name table-name="account_holder" */ public abstract class accountHolderBean extends defaultEntityBean { /** * @ejb:interface-method view="local" * @ejb:persistent-field * @ejb:pk-field * * @jboss:column-name name="account_id" */ public abstract Integer getAccountHolderId(); /** * @ejb:interface-method view="local" * @ejb:persistent-field * * @jboss:column-name name="account_id" */ public abstract void setAccountHolderId(Integer theAccountHolderId); /** * @ejb:interface-method view="local" * @ejb:persistent-field * * @jboss:column-name name="account_role_id" */ . . . /** * @ejb:interface-method view="local" */ public abstract accountHolderBeanData getData(); /** * @ejb:interface-method view="local" */ public abstract void setData(accountHolderBeanData theData); /** * * @ejb:create-method */ //public accountHolderBeanPK ejbCreate(String theEmailAddress, public java.lang.Object ejbCreate(String theEmailAddress, String theEmailTypeCd, String theAccountPassword) throws CreateException { setAccountRoleId(new Integer(1)); setEmailAddress(theEmailAddress); setEmailTypeCd(theEmailTypeCd); setAccountPassword(theAccountPassword); return null; } public void ejbPostCreate(String theEmailAddress, String theEmailTypeCd, String theAccountPassword) throws CreateException { } } Thanks, a lot! Matt Hanson -----Original Message----- From: Hanson, Matthew [mailto:Mat...@us...] Sent: Thursday, May 15, 2003 9:20 AM To: 'xdo...@li...' Subject: [Xdoclet-user] EJB Unknown Primary Keys Hi-- I would like to use container-managed primary keys in an entity bean. I am using Xdoclet to generate interfaces and deployment descriptors for my jboss cmp entity beans. To be brief, there are requirements for unknown (auto-incremented) primary keys specify certain entries in ebj-jar.xml (prim-key-class as java.lang.Object) and jbosscmp-jbcd.xml (unknown-pk_class). Furthermore, the local home interfaces must return java.lang.Object for the create methods and pass java.lang.Object to findByPrimaryKey. Because I am using Xdoclet to generate my interfaces and deployment descriptors, I am wondering what tags and/or attributes, if any, that I need to set to have these unknown primary key requirements met. Can someone please advise on if any special tags or attribute values will help me out? Thanks! Matt Hanson ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com _______________________________________________ xdoclet-user mailing list xdo...@li... https://lists.sourceforge.net/lists/listinfo/xdoclet-user |