gov.nih.nci.caarray.services.contact.ejb
Class ContactManagerEJB

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.AbstractSessionBean
      extended by gov.nih.nci.caarray.services.contact.ejb.ContactManagerEJB
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ContactManagerEJB
extends AbstractSessionBean
implements javax.ejb.SessionBean

This class contains the implemention of the ContactManagerEJB.

Author:
tranp
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
logger_, sessionCtx_
 
Constructor Summary
ContactManagerEJB()
           
 
Method Summary
 long addOrganization(OrganizationData orgData)
          Adds a new organization to the persistence store with the specified data.
 long addPerson(PersonData personData)
          Adds a new person to the persistence store with the specified data.
 void deleteOrganization(long id)
           
 void deletePerson(long id)
           
 void ejbCreate()
           
 void ejbRemove()
          called when remove method is called.
 OrganizationData getOrganization(long id)
           
 OrganizationData[] getOrganizations()
           
 PersonData getPerson(long id)
           
 PersonData[] getPersons()
          Gets a list of all contact users in and returns a PersonData object for each.
 OrganizationDesc[] searchOrganizations(OrganizationSearchCriteria criteria)
          Gets a list of users matching the criteria and returns a OrganizationDesc object for each.
 PersonDesc[] searchPersons(PersonSearchCriteria criteria)
          Gets a list of users matching the criteria and returns a PersonDesc object for each.
 void updateOrganization(OrganizationData orgData)
          Updates an existing organization in the persistence store with the specified data.
 void updatePerson(PersonData personData)
          Updates an existing person in the persistence store with the specified data.
 
Methods inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
disableAndRememberPreviousValueForCollectionDescriptorCascadeRetrieve, disableAndRememberPreviousValueForObjectDescriptorCascadeRetrieve, ejbActivate, ejbPassivate, getUserTransaction, resetCollectionDescriptorCascadeToPreviousValue, resetObjectDescriptorCascadeToPreviousValue, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.SessionBean
ejbActivate, ejbPassivate, setSessionContext
 

Constructor Detail

ContactManagerEJB

public ContactManagerEJB()
Method Detail

ejbCreate

public void ejbCreate()
               throws java.rmi.RemoteException,
                      javax.ejb.CreateException
Overrides:
ejbCreate in class AbstractSessionBean
Throws:
javax.ejb.CreateException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
called when remove method is called.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Overrides:
ejbRemove in class AbstractSessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

addPerson

public long addPerson(PersonData personData)
               throws java.lang.Exception
Adds a new person to the persistence store with the specified data.

Parameters:
personData - - The data for the new person.
Throws:
java.lang.Exception

updatePerson

public void updatePerson(PersonData personData)
                  throws java.lang.Exception
Updates an existing person in the persistence store with the specified data.

Parameters:
personData - - The data for the existing person.
Throws:
java.lang.Exception

searchPersons

public PersonDesc[] searchPersons(PersonSearchCriteria criteria)
                           throws java.lang.Exception
Gets a list of users matching the criteria and returns a PersonDesc object for each.

Throws:
java.lang.Exception

getPersons

public PersonData[] getPersons()
                        throws java.lang.Exception
Gets a list of all contact users in and returns a PersonData object for each.

Throws:
java.lang.Exception

getPerson

public PersonData getPerson(long id)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getOrganizations

public OrganizationData[] getOrganizations()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

searchOrganizations

public OrganizationDesc[] searchOrganizations(OrganizationSearchCriteria criteria)
                                       throws java.lang.Exception
Gets a list of users matching the criteria and returns a OrganizationDesc object for each.

Throws:
java.lang.Exception

getOrganization

public OrganizationData getOrganization(long id)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

addOrganization

public long addOrganization(OrganizationData orgData)
                     throws java.lang.Exception
Adds a new organization to the persistence store with the specified data.

Parameters:
orgData - - The data for the new organization.
Throws:
java.lang.Exception

updateOrganization

public void updateOrganization(OrganizationData orgData)
                        throws java.lang.Exception
Updates an existing organization in the persistence store with the specified data.

Parameters:
orgData - - The data for the existing organization.
Throws:
java.lang.Exception

deleteOrganization

public void deleteOrganization(long id)
                        throws java.lang.Exception
Throws:
java.lang.Exception

deletePerson

public void deletePerson(long id)
                  throws java.lang.Exception
Throws:
java.lang.Exception