📄 catalogejb.java
字号:
package apusic.myshop.catalog.ejb;import java.rmi.RemoteException;import javax.naming.InitialContext;import javax.naming.Context;import javax.naming.NamingException;import javax.ejb.EntityBean;import javax.ejb.EntityContext;import javax.ejb.EJBException;import javax.ejb.FinderException;import javax.ejb.CreateException;import javax.ejb.RemoveException;import javax.ejb.DuplicateKeyException;public class CatalogEJB implements EntityBean{ public String cataId; public String category; public String name; public String descn; private EntityContext initCtx; protected transient boolean dirty = false; public void ejbActivate() { // } public void ejbPassivate() { // } public void ejbLoad() throws RemoteException { setDirty(false); } public void ejbStore() { setDirty(false); } public void ejbRemove() throws RemoveException { // } private void setDirty(boolean flag) { dirty = flag; } public boolean isModified() { return dirty; } public void setEntityContext(EntityContext ctx) { initCtx = ctx; } public void unsetEntityContext() { initCtx = null; } public CatalogPK ejbCreate(String cataId, String category, String name, String descn) throws CreateException { this.cataId = cataId; this.category = category; this.name = name; this.descn = descn; return null; } public void ejbPostCreate(String cataId, String category, String name, String descn){} public String getCataId() { return cataId; } public String getCategory() { return category; } public String getName() { return name; } public String getDescn() { return descn; } public void setCataId(String cataId) { this.cataId = cataId; setDirty(true); } public void setCategory(String category) { this.category = category; setDirty(true); } public void setName(String name) { this.name = name; } public void setDescn(String descn) { this.descn = descn; setDirty(true); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -