?? conceptstrwebimpl.java~
字號:
/* */package com.sun.j2ee.workflow.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 + -