KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > pim > ejb > session > ContactManagerBean


1 package org.enhydra.pim.ejb.session;
2
3 import java.math.BigDecimal JavaDoc;
4 import java.util.Vector JavaDoc;
5
6 import org.enhydra.pim.business.ContactManager;
7 import org.enhydra.pim.business.ContactManagerI;
8 import org.enhydra.pim.business.api.ContactI;
9 import org.enhydra.pim.business.api.ContactTypeI;
10 import org.enhydra.pim.business.api.PersonI;
11 import org.enhydra.pim.exception.EnhydraPimException;
12
13 import com.lutris.appserver.server.sql.ObjectId;
14
15 /**
16  *
17  * <!-- begin-user-doc --> A generated session bean <!-- end-user-doc --> *
18  <!-- lomboz.beginDefinition -->
19  <?xml version="1.0" encoding="UTF-8"?>
20  <lomboz:EJB xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:lomboz="http://lomboz.objectlearn.com/xml/lomboz">
21  <lomboz:session>
22  <lomboz:sessionEjb>
23  <j2ee:display-name>ContactManager</j2ee:display-name>
24  <j2ee:ejb-name>ContactManagerEjb</j2ee:ejb-name>
25  <j2ee:ejb-class>org.enhydra.pim.ejb.session.ContactManagerBean</j2ee:ejb-class>
26  <j2ee:session-type>Stateless</j2ee:session-type>
27  <j2ee:transaction-type>Container</j2ee:transaction-type>
28  </lomboz:sessionEjb>
29  </lomboz:session>
30  </lomboz:EJB>
31  <!-- lomboz.endDefinition -->
32  *
33  * <!-- begin-xdoclet-definition -->
34  * @ejb.bean name="ContactManager"
35  * jndi-name="ContactManagerEjb"
36  * local-jndi-name="LocalContactManagerEjb"
37  * remote-business-interface="org.enhydra.pim.business.ContactManagerI"
38  * local-business-interface="org.enhydra.pim.business.ContactManagerI"
39  * type="Stateless"
40  * transaction-type="Container"
41  *
42  * <!-- end-xdoclet-definition -->
43  * @generated
44  */

45 public abstract class ContactManagerBean implements ContactManagerI, javax.ejb.SessionBean JavaDoc{
46     
47     private javax.ejb.SessionContext JavaDoc _ctx = null;
48     private ContactManagerI contactManager = null;
49
50     public void setSessionContext(javax.ejb.SessionContext JavaDoc ctx){
51         _ctx = ctx;
52     }
53
54     public void unsetSessionContext(){
55         _ctx = null;
56     }
57     
58     public void ejbActivate(){
59     }
60
61     public void ejbPassivate(){
62     }
63
64     
65     public void ejbRemove(){
66         contactManager= null;
67     }
68
69     public void ejbCreate() throws javax.ejb.CreateException JavaDoc{
70         contactManager = new ContactManager();
71     }
72
73     public ContactI newContact(String JavaDoc contact_data, ContactTypeI contact_type, PersonI person, String JavaDoc note) {
74         return contactManager.newContact(contact_data, contact_type, person, note);
75     }
76
77     public ContactI newContact(BigDecimal JavaDoc handle, String JavaDoc contact_data, ContactTypeI contact_type, PersonI person, String JavaDoc note) {
78         return contactManager.newContact(handle, contact_data, contact_type, person, note);
79     }
80
81     public ContactI addContact(ContactI contact, PersonI person, ContactTypeI cType) throws EnhydraPimException {
82         return contactManager.addContact(contact, person, cType);
83     }
84
85     public ContactI updateContact(ContactI contact) throws EnhydraPimException {
86         return contactManager.updateContact(contact);
87     }
88
89     public Vector JavaDoc getPersonContacts(PersonI person) throws EnhydraPimException {
90         return contactManager.getPersonContacts(person);
91     }
92
93     public void removeContact(ContactI contact) throws EnhydraPimException {
94         contactManager.removeContact(contact);
95         
96     }
97
98     public ContactI findContact(ObjectId oid) throws EnhydraPimException {
99         return contactManager.findContact(oid);
100     }
101
102     public ContactI findContact(BigDecimal JavaDoc handle) throws EnhydraPimException {
103         return contactManager.findContact(handle);
104     }
105     
106 }
Popular Tags