1 /* 2 * JOnAS: Java(TM) Open Application Server 3 * Copyright (C) 1999 Bull S.A. 4 * Contact: jonas-team@objectweb.org 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 19 * USA 20 * 21 * -------------------------------------------------------------------------- 22 * $Id: PersonEC.java,v 1.1 2003/12/05 14:16:52 legrasi Exp $ 23 * -------------------------------------------------------------------------- 24 */ 25 26 /** 27 * This is an entity bean with "container managed persistence version 1.x". 28 * This bean is used to test an entity with an unknown primary key class at the development phase. 29 * @author Helene Joanin 30 */ 31 32 package org.objectweb.jonas.jtests.beans.fbasic; 33 34 import java.rmi.RemoteException; 35 import java.sql.Connection; 36 import java.sql.PreparedStatement; 37 import java.sql.ResultSet; 38 import java.sql.SQLException; 39 import java.sql.Statement; 40 import java.util.Collection; 41 import java.util.Vector; 42 import javax.ejb.CreateException; 43 import javax.ejb.DuplicateKeyException; 44 import javax.ejb.EJBObject; 45 import javax.ejb.EJBException; 46 import javax.ejb.EntityBean; 47 import javax.ejb.EntityContext; 48 import javax.ejb.FinderException; 49 import javax.ejb.ObjectNotFoundException; 50 import javax.ejb.RemoveException; 51 import javax.naming.Context; 52 import javax.naming.InitialContext; 53 import javax.naming.NamingException; 54 import javax.sql.DataSource; 55 import javax.transaction.NotSupportedException; 56 import javax.transaction.Status; 57 import javax.transaction.SystemException; 58 import javax.transaction.UserTransaction; 59 60 61 /** 62 * 63 */ 64 public class PersonEC extends PersonEC2 implements EntityBean { 65 66 // ------------------------------------------------------------------ 67 // State of the bean (CMP v1) 68 // They must be public for Container Managed Persistence. 69 // ------------------------------------------------------------------ 70 public Integer number; 71 public String name; 72 73 // ------------------------------------------------------------------ 74 // Accessors and setters implementation 75 // ------------------------------------------------------------------ 76 77 /** 78 * getNumber 79 */ 80 public Integer getNumber() { 81 82 return number; 83 } 84 /** 85 * setNumber 86 */ 87 public void setNumber(Integer num) { 88 89 number = num; 90 } 91 92 /** 93 * getName 94 */ 95 public String getName() { 96 97 return name; 98 } 99 /** 100 * setName 101 */ 102 public void setName(String s) { 103 104 name = new String(s); 105 } 106 107 } 108