⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conceptstrwebimpl.java

📁 J2EE & Tomcat books published by hope
💻 JAVA
字号:
/* */package org.impact.stars.control.web;import java.util.Locale;import org.impact.stars.control.exceptions.GeneralFailureException;import org.impact.stars.control.exceptions.StarsAppException;import javax.servlet.ServletContext;import javax.naming.NamingException;import org.impact.stars.util.JNDINames;import org.impact.stars.util.WebKeys;import org.impact.stars.util.JSPUtil;import org.impact.stars.util.EJBUtil;import org.impact.stars.conceptmd.conceptstr.model.ConceptstrModel;import org.impact.stars.conceptmd.conceptstr.ejb.ConceptstrLocal;import org.impact.stars.conceptmd.conceptstr.ejb.ConceptstrLocalHome;import org.impact.stars.conceptmd.concept.ejb.ConceptLocal;import org.impact.stars.control.web.AppModelManager;import org.impact.stars.control.web.ModelUpdateListener;import org.impact.stars.util.Debug;/** * This class is the web-tier representation of the Conceptstr Data. */public class ConceptstrWebImpl extends ConceptstrModel    implements ModelUpdateListener, java.io.Serializable {    private AppModelManager apmm;    private ConceptstrLocal conceptstrEjb;    private ServletContext context;        public ConceptstrWebImpl() {        super();   }    public void init(ServletContext context) {        this.context = context;        this.apmm = (AppModelManager)context.getAttribute(WebKeys.AppModelManagerKey);        apmm.addListener(JNDINames.CONCEPTSTR_EJBHOME, this);    }    public void performUpdate() throws StarsAppException {        Debug.println("ConceptstrWebImpl performUpdate..: ");        // Get data from the EJB        if (conceptstrEjb == null) {           try {                 ConceptstrLocalHome chome = EJBUtil.getConceptstrLocalHome();            conceptstrEjb = chome.findByPrimaryKey(this.getConceptstrID());            } catch (javax.ejb.FinderException fde) {                throw new StarsAppException("Unable to find an conceptstr/profile with conceptstr id : " );            } catch (javax.ejb.NoSuchEntityException nee) {                throw new StarsAppException("Unable to find an conceptstr/profile with conceptstr id : " );            } catch (javax.naming.NamingException nme) {                Debug.println("ConceptstrWebImpl naming exception: ");                throw new StarsAppException("Irrecoverable error while updating conceptstr : ");            }                    }            copy(conceptstrEjb.getDetails());    }        public ConceptstrModel toConceptstrModel() {        ConceptstrModel cmdl = new ConceptstrModel();        cmdl.copy(this);        return cmdl;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -