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.bankiiop.ejb;
023:
024: import java.util.*;
025:
026: import org.jboss.test.util.ejb.EntitySupport;
027: import org.jboss.test.bankiiop.interfaces.*;
028:
029: /**
030: *
031: * @author Rickard Oberg
032: * @author $Author: dimitris@jboss.org $
033: * @version $Revision: 57211 $
034: */
035: public class CustomerBean extends EntitySupport {
036: // Constants -----------------------------------------------------
037:
038: // Attributes ----------------------------------------------------
039: public String id;
040: public String name;
041: public Collection accounts;
042:
043: // Static --------------------------------------------------------
044:
045: // Constructors --------------------------------------------------
046:
047: // Public --------------------------------------------------------
048: public String getId() {
049: return id;
050: }
051:
052: public void setId(String id) {
053: this .id = id;
054: }
055:
056: public String getName() {
057: return name;
058: }
059:
060: public void setName(String name) {
061: this .name = name;
062: }
063:
064: public Collection getAccounts() {
065: return accounts;
066: }
067:
068: public void addAccount(Account acct) {
069: accounts.add(acct);
070: }
071:
072: public void removeAccount(Account acct) {
073: accounts.remove(acct);
074: }
075:
076: // EntityHome implementation -------------------------------------
077: public CustomerPK ejbCreate(String id, String name) {
078: setId(id);
079: setName(name);
080: accounts = new ArrayList();
081:
082: CustomerPK pk = new CustomerPK();
083: pk.id = id;
084: pk.name = name;
085:
086: return pk;
087: }
088:
089: public void ejbPostCreate(String id, String name) {
090: }
091: }
092:
093: /*
094: * $Id: CustomerBean.java 57211 2006-09-26 12:39:46Z dimitris@jboss.org $
095: * Currently locked by:$Locker$
096: * Revision:
097: * $Log$
098: * Revision 1.2.16.2 2005/10/29 05:04:35 starksm
099: * Update the LGPL header
100: *
101: * Revision 1.2.16.1 2005/04/06 16:28:04 starksm
102: * Fix the license header
103: *
104: * Revision 1.2 2002/05/27 22:41:49 reverbel
105: * Making the bankiiop test work with the multiple invokers code:
106: * - The test client uses the CosNaming jndi provider.
107: * - Beans use ejb-refs to find each other.
108: * - These refs are properly set up for IIOP (in jboss.xml).
109: *
110: * Revision 1.1 2002/03/15 22:36:28 reverbel
111: * Initial version of the bank test for JBoss/IIOP.
112: *
113: * Revision 1.4 2001/01/20 16:32:51 osh
114: * More cleanup to avoid verifier warnings.
115: *
116: * Revision 1.3 2001/01/07 23:14:34 peter
117: * Trying to get JAAS to work within test suite.
118: *
119: * Revision 1.2 2000/09/30 01:00:54 fleury
120: * Updated bank tests to work with new jBoss version
121: *
122: * Revision 1.1.1.1 2000/06/21 15:52:37 oberg
123: * Initial import of jBoss test. This module contains CTS tests, some simple examples, and small bean suites.
124: *
125: *
126: *
127: */
|