1 22 package org.jboss.test.cmp2.enums.ejb; 23 24 import javax.ejb.EntityBean ; 25 import javax.ejb.EntityContext ; 26 import javax.ejb.RemoveException ; 27 import javax.ejb.CreateException ; 28 29 30 73 public abstract class ChildCMPBean 74 implements EntityBean 75 { 76 private EntityContext ctx; 78 79 86 public abstract IDClass getId(); 87 88 public abstract void setId(IDClass id); 89 90 95 public abstract ColorEnum getColor(); 96 97 100 public abstract void setColor(ColorEnum color); 101 102 107 public abstract AnimalEnum getAnimal(); 108 109 112 public abstract void setAnimal(AnimalEnum animal); 113 114 119 public IDClass ejbCreate(IDClass childId) 120 throws CreateException 121 { 122 setId(childId); 123 setColor(ColorEnum.RED); 124 setAnimal(AnimalEnum.PENGUIN); 125 return null; 126 } 127 128 public void ejbPostCreate(IDClass childId) 129 { 130 } 131 132 135 public void setEntityContext(EntityContext ctx) 136 { 137 this.ctx = ctx; 138 } 139 140 143 public void unsetEntityContext() 144 { 145 this.ctx = null; 146 } 147 148 public void ejbActivate() 149 { 150 } 151 152 public void ejbLoad() 153 { 154 } 155 156 public void ejbPassivate() 157 { 158 } 159 160 public void ejbRemove() throws RemoveException 161 { 162 } 163 164 public void ejbStore() 165 { 166 } 167 } 168 | Popular Tags |