XDocklet - ejb.value-object (How to create collections.)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, July 3, 2008 01:12 PM

How to create Value List using ejb.value-object. I need a collection of value objects in CMP entity bean so that I can use it various methods. Please help I am new to XDocklet. I do not have specific code snippet in question. /** * */ package com.cmp.security; import java.rmi.RemoteException; import javax.ejb.EJBException; import javax.ejb.EntityContext; import javax.ejb.RemoveException; import com.app.services.constants.RecordStatus; /** * * @ejb.bean name="User" * jndi-name="security/User"    More>>

How to create Value List using ejb.value-object. I need a collection of value objects in CMP entity bean so that I can use it various methods. Please help I am new to XDocklet.


I do not have specific code snippet in question.


/**

*

*/

package com.cmp.security;



import java.rmi.RemoteException;



import javax.ejb.EJBException;

import javax.ejb.EntityContext;

import javax.ejb.RemoveException;



import com.app.services.constants.RecordStatus;





/**

*

* @ejb.bean name="User"

* jndi-name="security/User"

* type="CMP"

* primkey-field="userName"

* schema="UserSCHEMA"

* cmp-version="2.x"

*

* @ejb.home generate="local,remote"
* local-class="com.cmp.security.local.UserLocalHome"

* remote-class="com.cmp.security.remote.UserHome"

*

* @ejb.persistence

* table-name="User"

*

* @ejb.value-object

* name="User"

* match="*"

*

* @ejb.value-object

* name="CreateUser"

* match="create"

*

* @ejb.value-object

* name="ModifyUser"

* match="modify"

*

* @ejb.value-object

* name="ActivateUser"

* match="activate"

*
* @ejb.value-object
* name="InActivateUser"
* match="inactivate"
*

* @ejb.finder

* signature="java.util.Collection findByStatus(java.lang.String status)"

* query="SELECT OBJECT(a) FROM UserSCHEMA as a WHERE a.status = ?1"

*

* @ejb.finder

* signature="java.util.Collection findAll()"

* query="SELECT OBJECT(a) FROM UserSCHEMA as a"

*

* @ejb.pk class="java.lang.String"

*

*

* @jboss.persistence datasource="java:/DB2DS" datasource-mapping="DB2" table-name="User" create-table="true" remove-table="true" alter-table="true"

*
* @generated

**/



public abstract class UserBean implements javax.ejb.EntityBean {



protected EntityContext entityContext = null;

// Rest of the code.


}

   <<Less
About | Sitemap | Contact