1 22 package org.jboss.test.banknew.ejb; 23 24 import javax.ejb.CreateException ; 25 26 import org.jboss.test.banknew.interfaces.AccountData; 27 import org.jboss.test.banknew.interfaces.AccountPK; 28 import org.jboss.test.util.ejb.EntitySupport; 29 30 76 public abstract class AccountBean 77 extends EntitySupport 78 { 79 81 83 85 87 89 95 abstract public String getId(); 96 97 abstract public void setId( String pId ); 98 99 104 abstract public String getCustomerId(); 105 106 abstract public void setCustomerId( String pCustomerId ); 107 108 113 abstract public int getType(); 114 115 abstract public void setType( int pType ); 116 117 123 abstract public float getBalance(); 124 125 abstract public void setBalance( float pAmount ); 126 127 130 public abstract void setData( AccountData pData ); 131 132 135 public abstract AccountData getData(); 136 137 139 141 145 public AccountPK ejbCreate( AccountData pData ) 146 throws CreateException 147 { 148 setId( pData.getCustomerId() + ":" + pData.getType() ); 149 setData( pData ); 150 151 return null; 152 } 153 154 public void ejbPostCreate( AccountData data ) 155 throws CreateException 156 { 157 } 158 } 159 160 210 | Popular Tags |