001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.readahead.ejb;
023:
024: import javax.ejb.EntityBean;
025: import javax.ejb.CreateException;
026: import javax.ejb.RemoveException;
027: import javax.ejb.EntityContext;
028: import org.jboss.test.readahead.interfaces.AddressPK;
029:
030: /**
031: * Implementation class for one of the entities used in read-ahead finder
032: * tests
033: *
034: * @author <a href="mailto:danch@nvisia.com">danch (Dan Christopherson</a>
035: * @version $Id: Address.java 57211 2006-09-26 12:39:46Z dimitris@jboss.org $
036: *
037: * Revision:
038: */
039: public class Address implements EntityBean {
040: EntityContext entityContext;
041: public String key;
042: public String addressId;
043: public String address;
044: public String city;
045: public String state;
046: public String zip;
047:
048: public AddressPK ejbCreate(String key, String addressId,
049: String address, String city, String state, String zip)
050: throws CreateException {
051: this .key = key;
052: this .addressId = addressId;
053: this .address = address;
054: this .city = city;
055: this .state = state;
056: this .zip = zip;
057: return new AddressPK(key, addressId);
058: }
059:
060: public void ejbPostCreate(String key, String addressId,
061: String address, String city, String state, String zip)
062: throws CreateException {
063: }
064:
065: public void ejbRemove() throws RemoveException {
066: }
067:
068: public void ejbActivate() {
069: }
070:
071: public void ejbPassivate() {
072: }
073:
074: public void ejbLoad() {
075: }
076:
077: public void ejbStore() {
078: }
079:
080: public void setEntityContext(EntityContext entityContext) {
081: this .entityContext = entityContext;
082: }
083:
084: public void unsetEntityContext() {
085: entityContext = null;
086: }
087:
088: public void setKey(String newKey) {
089: key = newKey;
090: }
091:
092: public String getKey() {
093: return key;
094: }
095:
096: public void setAddressId(String newAddressId) {
097: addressId = newAddressId;
098: }
099:
100: public String getAddressId() {
101: return addressId;
102: }
103:
104: public void setAddress(String newAddress) {
105: address = newAddress;
106: }
107:
108: public String getAddress() {
109: return address;
110: }
111:
112: public void setCity(String newCity) {
113: city = newCity;
114: }
115:
116: public String getCity() {
117: return city;
118: }
119:
120: public void setState(String newState) {
121: state = newState;
122: }
123:
124: public String getState() {
125: return state;
126: }
127:
128: public void setZip(String newZip) {
129: zip = newZip;
130: }
131:
132: public String getZip() {
133: return zip;
134: }
135: }
|