1 25 26 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 65 public abstract class PersonEC2 implements EntityBean { 66 67 68 EntityContext ejbContext; 69 70 public abstract Integer getNumber(); 74 public abstract void setNumber(Integer num); 75 76 public abstract String getName(); 77 public abstract void setName(String name); 78 79 83 93 public void setEntityContext(EntityContext ctx) { 94 95 ejbContext = ctx; 96 } 97 98 109 public void unsetEntityContext() { 110 111 ejbContext = null; 112 } 113 114 127 public void ejbRemove() throws RemoveException { 128 129 } 130 131 139 public void ejbLoad() { 140 141 } 142 143 151 public void ejbStore() { 152 153 } 154 155 161 public java.lang.Object ejbCreate(int i, String s) throws CreateException , DuplicateKeyException { 162 163 164 setNumber(new Integer (i)); 166 setName(new String (s)); 167 168 return null; 170 } 171 172 177 public void ejbPostCreate(int i, String s) throws CreateException { 178 179 } 180 181 185 public void ejbPassivate() { 186 187 } 188 189 194 public void ejbActivate() { 195 196 } 197 198 202 205 public int getNumberPrimitive() { 206 207 return getNumber().intValue(); 208 } 209 210 } 211 | Popular Tags |