1 package test.ejb; 2 3 import java.util.Date ; 4 import javax.ejb.CreateException ; 5 import javax.ejb.EntityBean ; 6 import javax.ejb.EntityContext ; 7 import javax.ejb.RemoveException ; 8 9 82 public abstract class FileBean 83 implements EntityBean 84 { 85 86 89 public String ejbCreate(String id, String contentType, byte[] content) 90 throws CreateException 91 { 92 setId(id); 93 setContentType(contentType); 94 setContent(content); 95 setCreationDate(new Date ()); 96 return null; 97 } 98 99 public void ejbPostCreate(String id, int uid, String contentType, byte[] content) 100 { 101 } 102 103 112 public abstract String getId(); 113 114 117 public abstract void setId(String id); 118 119 125 public abstract byte[] getContent(); 126 127 130 public abstract void setContent(byte[] content); 131 132 140 public abstract String getContentType(); 141 142 145 public abstract void setContentType(String contentType); 146 147 155 public abstract java.util.Date getCreationDate(); 156 157 160 public abstract void setCreationDate(java.util.Date creationDate); 161 162 public void ejbActivate() { } 163 public void ejbPassivate() { } 164 public void ejbRemove() throws RemoveException { } 165 public void setEntityContext(EntityContext entityContext) { } 166 public void unsetEntityContext() { } 167 public void ejbLoad() { } 168 public void ejbStore() { } 169 170 } 171 | Popular Tags |