1 15 package org.apache.tapestry.vlib.ejb.impl; 16 17 import java.rmi.RemoteException ; 18 import java.sql.Timestamp ; 19 import java.util.Map ; 20 21 import javax.ejb.CreateException ; 22 23 35 36 public abstract class BookBean extends AbstractEntityBean 37 { 38 protected String [] getAttributePropertyNames() 39 { 40 return new String [] { 41 "title", 42 "description", 43 "ISBN", 44 "holderId", 45 "ownerId", 46 "publisherId", 47 "author", 48 "hidden", 49 "lendable", 50 "dateAdded" }; 51 } 52 53 public abstract void setBookId(Integer value); 54 55 public abstract Integer getBookId(); 56 57 public abstract String getAuthor(); 58 59 public abstract void setAuthor(String value); 60 61 public abstract String getDescription(); 62 63 public abstract void setDescription(String value); 64 65 public abstract String getISBN(); 66 67 public abstract void setISBN(String value); 68 69 public abstract String getTitle(); 70 71 public abstract void setTitle(String value); 72 73 public abstract Integer getHolderId(); 74 75 public abstract void setHolderId(Integer value); 76 77 public abstract Integer getOwnerId() throws RemoteException ; 78 79 public abstract void setOwnerId(Integer value); 80 81 public abstract void setPublisherId(Integer value); 82 83 public abstract Integer getPublisherId(); 84 85 public abstract boolean getHidden(); 86 87 public abstract void setHidden(boolean value); 88 89 public abstract boolean getLendable(); 90 91 public abstract void setLendable(boolean value); 92 93 public abstract Timestamp getDateAdded(); 94 95 public abstract void setDateAdded(Timestamp value); 96 97 99 public Integer ejbCreate(Map attributes) throws CreateException , RemoteException 100 { 101 setLendable(true); 102 103 updateEntityAttributes(attributes); 104 105 setBookId(allocateKey()); 106 107 return null; 108 } 109 110 public void ejbPostCreate(Map attributes) 111 { 112 } 114 115 } | Popular Tags |