1 22 package org.jboss.test.perf.ejb; 23 import org.jboss.test.perf.interfaces.Entity2PK; 24 25 public class Entity2Bean implements javax.ejb.EntityBean 26 { 27 private javax.ejb.EntityContext _context; 28 private transient boolean isDirty; 29 30 public int key1; 31 public String key2; 32 public Double key3; 33 public int the_value; 34 35 public int read() 36 { 37 setModified(false); return the_value; 39 } 40 41 public void write(int the_value) 42 { 43 setModified(true); this.the_value = the_value; 45 } 46 47 public Entity2PK ejbCreate(int key1, String key2, Double key3, int value) 48 { 49 this.key1 = key1; 50 this.key2 = key2; 51 this.key3 = key3; 52 this.the_value = value; 53 return null; 54 } 55 56 public void ejbPostCreate(int key1, String key2, Double key3, int value) 57 { 58 } 59 60 public void ejbRemove() 61 { 62 } 63 64 public void setEntityContext(javax.ejb.EntityContext context) 65 { 66 _context = context; 67 } 68 69 public void unsetEntityContext() 70 { 71 _context = null; 72 } 73 74 public void ejbActivate() 75 { 76 } 77 78 public void ejbPassivate() 79 { 80 } 81 82 public void ejbLoad() 83 { 84 setModified(false); } 87 88 public void ejbStore() 89 { 90 setModified(false); } 93 94 public String toString() 95 { 96 return "EntityBean[key=(" + key1 + ',' + key2 + ',' + key3 + "), the_value=" + the_value +"]"; 97 } 98 99 public boolean isModified() 101 { 102 return isDirty; 103 } 104 public void setModified(boolean flag) 106 { 107 isDirty = flag; 108 } 109 110 111 } 112 | Popular Tags |