1 22 package org.jboss.test.readahead.ejb; 23 24 import javax.ejb.EntityBean ; 25 import javax.ejb.CreateException ; 26 import javax.ejb.RemoveException ; 27 import javax.ejb.EntityContext ; 28 29 38 public class CMPFindTestEntity implements EntityBean { 39 org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(getClass()); 40 41 EntityContext entityContext; 42 public String key; 43 public String name; 44 public String rank; 45 public String serialNumber; 46 private boolean modified; 47 48 public String ejbCreate(String key) throws CreateException { 49 this.key = key; 50 return key; 51 } 52 public boolean isModified() { 53 return modified; 54 } 55 public void ejbPostCreate(String key) throws CreateException { 56 } 57 public void ejbRemove() throws RemoveException { 58 } 59 public void ejbActivate() { 60 } 61 public void ejbPassivate() { 62 } 63 public void ejbLoad() { 64 modified = false; 65 } 66 public void ejbStore() { 67 modified = false; 68 } 69 public void setEntityContext(EntityContext entityContext) { 70 this.entityContext = entityContext; 71 } 72 public void unsetEntityContext() { 73 entityContext = null; 74 } 75 public String getKey() { 76 return key; 77 } 78 public void setName(String newName) { 79 name = newName; 80 } 81 public String getName() { 82 return name; 83 } 84 public void setRank(String newRank) { 85 rank = newRank; 86 modified = true; 87 } 88 public String getRank() { 89 return rank; 90 } 91 public void setSerialNumber(String newSerialNumber) { 92 serialNumber = newSerialNumber; 93 modified = true; 94 } 95 public String getSerialNumber() { 96 return serialNumber; 97 } 98 } 99 | Popular Tags |