1 22 package org.jboss.test.testbean.bean; 23 24 import java.rmi.*; 25 import javax.ejb.*; 26 import org.jboss.test.testbean.interfaces.AComplexPK; 27 28 public class EntityPKBean implements EntityBean { 29 org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(getClass()); 30 public boolean aBoolean; 31 public int anInt; 32 public long aLong; 33 public double aDouble; 34 public String aString; 35 36 public int otherField; 37 38 private EntityContext entityContext; 39 40 41 public AComplexPK ejbCreate(boolean aBoolean, int anInt, long aLong, double aDouble, String aString) throws RemoteException, CreateException { 42 43 log.debug("EntityPK.ejbCreate() called"); 44 45 this.aBoolean = aBoolean; 46 this.anInt = anInt; 47 this.aLong = aLong; 48 this.aDouble = aDouble; 49 this.aString = aString; 50 51 return new AComplexPK(aBoolean, anInt, aLong, aDouble, aString); 52 } 53 54 public AComplexPK ejbCreateMETHOD(boolean aBoolean, int anInt, long aLong, double aDouble, String aString) throws RemoteException, CreateException { 55 56 log.debug("EntityPK.ejbCreateMETHOD() called"); 57 58 this.aBoolean = aBoolean; 59 this.anInt = anInt; 60 this.aLong = aLong; 61 this.aDouble = aDouble; 62 this.aString = aString; 63 64 return new AComplexPK(aBoolean, anInt, aLong, aDouble, aString); 65 } 66 67 public void ejbPostCreate(boolean aBoolean, int anInt, long aLong, double aDouble, String aString) throws RemoteException, CreateException { 68 69 log.debug("EntityPK.ejbPostCreate(pk) called"); 70 } 71 72 public void ejbPostCreateMETHOD(boolean aBoolean, int anInt, long aLong, double aDouble, String aString) throws RemoteException, CreateException { 73 74 log.debug("EntityPK.ejbPostCreateMETHOD(pk) called"); 75 } 76 77 public void ejbActivate() throws RemoteException { 78 79 log.debug("EntityPK.ejbActivate() called"); 80 } 81 82 public void ejbLoad() throws RemoteException { 83 84 log.debug("EntityPK.ejbLoad() called"); 85 } 86 87 public void ejbPassivate() throws RemoteException { 88 89 log.debug("EntityPK.ejbPassivate() called"); 90 } 91 92 public void ejbRemove() throws RemoteException, RemoveException { 93 94 log.debug("EntityPK.ejbRemove() called"); 95 } 96 97 public void ejbStore() throws RemoteException { 98 99 log.debug("EntityPK.ejbStore() called"); 100 } 101 102 103 public void setEntityContext(EntityContext context) throws RemoteException { 104 105 log.debug("EntityPK.setSessionContext() called"); 106 entityContext = context; 107 } 108 109 public void unsetEntityContext() throws RemoteException { 110 111 log.debug("EntityBMP.unsetSessionContext() called"); 112 entityContext = null; 113 } 114 115 public void updateAllValues(AComplexPK aComplexPK) throws RemoteException { 116 117 this.aBoolean = aComplexPK.aBoolean; 118 this.aDouble = aComplexPK.aDouble; 119 this.aLong = aComplexPK.aLong; 120 this.anInt = aComplexPK.anInt; 121 this.aString = aComplexPK.aString; 122 123 }; 124 125 public AComplexPK readAllValues() throws RemoteException { 126 127 return new AComplexPK(aBoolean, anInt, aLong, aDouble, aString); 128 129 130 }; 131 132 public int getOtherField() throws RemoteException { 133 return otherField; 134 } 135 136 public void setOtherField(int newValue) throws RemoteException { 137 otherField = newValue; 138 } 139 140 } 141 | Popular Tags |