1 22 package org.jboss.test.cmp2.lob; 23 24 import javax.ejb.EntityBean ; 25 import javax.ejb.EntityContext ; 26 import javax.ejb.CreateException ; 27 import javax.ejb.RemoveException ; 28 import java.util.Map ; 29 import java.util.List ; 30 import java.util.Set ; 31 import java.util.HashMap ; 32 import java.util.ArrayList ; 33 import java.util.HashSet ; 34 35 45 public abstract class LOBBean implements EntityBean 46 { 47 private EntityContext mEntityContext; 48 49 53 public abstract Integer getId(); 54 55 59 public abstract void setId(Integer id); 60 61 65 public abstract String getBigString(); 66 67 73 public abstract void setBigString(String s); 74 75 79 public abstract byte[] getBinaryData(); 80 81 87 public abstract void setBinaryData(byte[] data); 88 89 public abstract Object getObjectField(); 90 public abstract void setObjectField(Object obj); 91 92 public abstract Map getMapField(); 93 public abstract void setMapField(Map map); 94 95 public abstract List getListField(); 96 public abstract void setListField(List list); 97 98 public abstract Set getSetField(); 99 public abstract void setSetField(Set set); 100 101 public abstract ValueHolder getValueHolder(); 102 public abstract void setValueHolder(ValueHolder valueHolder); 103 104 public abstract ValueHolder getCleanGetValueHolder(); 105 public abstract void setCleanGetValueHolder(ValueHolder valueHolder); 106 107 public abstract ValueHolder getStateFactoryValueHolder(); 108 public abstract void setStateFactoryValueHolder(ValueHolder valueHolder); 109 110 111 113 public Integer ejbCreate(Integer id) throws CreateException 114 { 115 setId(id); 116 setMapField(new HashMap ()); 117 setListField(new ArrayList ()); 118 setSetField(new HashSet ()); 119 setValueHolder(new ValueHolder(null)); 120 setCleanGetValueHolder(new ValueHolder(null)); 121 setStateFactoryValueHolder(new ValueHolder(null)); 122 return null; 123 } 124 125 public void ejbPostCreate(Integer id) {} 126 127 public void ejbActivate() {} 128 public void ejbLoad() {} 129 public void ejbPassivate() {} 130 public void ejbRemove() throws RemoveException {} 131 public void ejbStore() {} 132 133 public void setEntityContext(EntityContext ctx) 134 { 135 mEntityContext = ctx; 136 } 137 138 public void unsetEntityContext() 139 { 140 mEntityContext = null; 141 } 142 } 143 | Popular Tags |