KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > readahead > ejb > Address


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.readahead.ejb;
23
24 import javax.ejb.EntityBean JavaDoc;
25 import javax.ejb.CreateException JavaDoc;
26 import javax.ejb.RemoveException JavaDoc;
27 import javax.ejb.EntityContext JavaDoc;
28 import org.jboss.test.readahead.interfaces.AddressPK;
29
30 /**
31  * Implementation class for one of the entities used in read-ahead finder
32  * tests
33  *
34  * @author <a HREF="mailto:danch@nvisia.com">danch (Dan Christopherson</a>
35  * @version $Id: Address.java 37406 2005-10-29 23:41:24Z starksm $
36  *
37  * Revision:
38  */

39 public class Address implements EntityBean JavaDoc {
40    EntityContext JavaDoc entityContext;
41    public String JavaDoc key;
42    public String JavaDoc addressId;
43    public String JavaDoc address;
44    public String JavaDoc city;
45    public String JavaDoc state;
46    public String JavaDoc zip;
47    
48    public AddressPK ejbCreate(String JavaDoc key, String JavaDoc addressId, String JavaDoc address,
49                               String JavaDoc city, String JavaDoc state, String JavaDoc zip)
50       throws CreateException JavaDoc
51    {
52       this.key = key;
53       this.addressId = addressId;
54       this.address = address;
55       this.city = city;
56       this.state = state;
57       this.zip = zip;
58       return new AddressPK(key, addressId);
59    }
60    public void ejbPostCreate(String JavaDoc key, String JavaDoc addressId, String JavaDoc address,
61                              String JavaDoc city, String JavaDoc state, String JavaDoc zip) throws CreateException JavaDoc {
62    }
63    public void ejbRemove() throws RemoveException JavaDoc {
64    }
65    public void ejbActivate() {
66    }
67    public void ejbPassivate() {
68    }
69    public void ejbLoad() {
70    }
71    public void ejbStore() {
72    }
73    public void setEntityContext(EntityContext JavaDoc entityContext) {
74       this.entityContext = entityContext;
75    }
76    public void unsetEntityContext() {
77       entityContext = null;
78    }
79    public void setKey(String JavaDoc newKey) {
80       key = newKey;
81    }
82    public String JavaDoc getKey() {
83       return key;
84    }
85    public void setAddressId(String JavaDoc newAddressId) {
86       addressId = newAddressId;
87    }
88    public String JavaDoc getAddressId() {
89       return addressId;
90    }
91    public void setAddress(String JavaDoc newAddress) {
92       address = newAddress;
93    }
94    public String JavaDoc getAddress() {
95       return address;
96    }
97    public void setCity(String JavaDoc newCity) {
98       city = newCity;
99    }
100    public String JavaDoc getCity() {
101       return city;
102    }
103    public void setState(String JavaDoc newState) {
104       state = newState;
105    }
106    public String JavaDoc getState() {
107       return state;
108    }
109    public void setZip(String JavaDoc newZip) {
110       zip = newZip;
111    }
112    public String JavaDoc getZip() {
113       return zip;
114    }
115 }
Popular Tags