1 22 package org.jboss.test.cmp2.ejbselect; 23 24 import java.util.Collection ; 25 26 import javax.ejb.CreateException ; 27 import javax.ejb.EntityBean ; 28 import javax.ejb.EntityContext ; 29 import javax.ejb.FinderException ; 30 import javax.ejb.RemoveException ; 31 32 55 public abstract class ABean implements EntityBean 56 { 57 private EntityContext ctx; 58 59 65 public abstract String getId(); 66 public abstract void setId(String id); 67 68 73 public abstract int getIntField(); 74 77 public abstract void setIntField(int value); 78 79 85 public abstract Collection getBs(); 86 89 public abstract void setBs(Collection Bs); 90 91 93 96 public abstract Collection ejbSelectSomeBs(ALocal a) throws FinderException ; 97 98 101 public abstract Collection ejbSelectAWithBs() throws FinderException ; 102 103 107 public abstract Collection ejbSelectSomeBsDeclaredSQL(ALocal a) throws FinderException ; 108 109 113 public abstract int ejbSelectNullSum() throws FinderException ; 114 115 117 120 public Collection getSomeBs() throws FinderException 121 { 122 return ejbSelectSomeBs((ALocal)ctx.getEJBLocalObject()); 123 } 124 125 128 public Collection getSomeBsDeclaredSQL() throws FinderException 129 { 130 return ejbSelectSomeBsDeclaredSQL((ALocal)ctx.getEJBLocalObject()); 131 } 132 133 136 public Collection getAWithBs() throws FinderException 137 { 138 return ejbSelectAWithBs(); 139 } 140 141 143 146 public Collection ejbHomeGetSomeBs(ALocal a) throws FinderException 147 { 148 return ejbSelectSomeBs(a); 149 } 150 151 154 public Collection ejbHomeGetSomeBsDeclaredSQL(ALocal a) throws FinderException 155 { 156 return ejbSelectSomeBsDeclaredSQL(a); 157 } 158 159 162 public void ejbHomeCheckFinderForNull() throws FinderException 163 { 164 ejbSelectNullSum(); 165 } 166 167 170 public String ejbCreate(String id) throws CreateException 171 { 172 setId(id); 173 return null; 174 } 175 176 public void ejbPostCreate(String id) {} 177 178 public void setEntityContext(EntityContext ctx) 179 { 180 this.ctx = ctx; 181 } 182 183 public void unsetEntityContext() 184 { 185 this.ctx = null; 186 } 187 188 public void ejbRemove() throws RemoveException {} 189 public void ejbActivate() {} 190 public void ejbPassivate() {} 191 public void ejbLoad() {} 192 public void ejbStore() {} 193 } 194 | Popular Tags |