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

📄 dofundfindbyprimarykeyaction.java

📁 EJB+Struts+Webservice实现的开放式基金管理系统
💻 JAVA
字号:
package com.fund.fund.struts;

import com.fund.fund.FundDelegate;
import com.fund.fund.FundDto;
import java.util.Collection;
import java.util.ArrayList;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 *
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class DoFundFindByPrimaryKeyAction extends Action {
        /**
         *
         * @param actionMapping ActionMapping
         * @param actionForm ActionForm
         * @param httpServletRequest HttpServletRequest
         * @param httpServletResponse HttpServletResponse
         * @return ActionForward
         */
        public ActionForward execute(ActionMapping actionMapping,
        ActionForm actionForm,
                                 HttpServletRequest httpServletRequest,
                                 HttpServletResponse httpServletResponse) {
        FundDtoActionForm fundDtoActionForm = (FundDtoActionForm) actionForm;
        try {
            FundDelegate fundDelegate = new FundDelegate();
            FundDto fundDto = fundDelegate.fundFindByPrimaryKey(
                    fundDtoActionForm.getFundNo());
            Collection resultList = new ArrayList();
            resultList.add(fundDto);
            fundDtoActionForm.setdetailListCollection(resultList);
            httpServletRequest.setAttribute("finderMethodName",
                                            "fundFindByPrimaryKey");
            httpServletRequest.setAttribute("fundDtoActionForm",
                                            fundDtoActionForm);
        } catch (Exception ex) {
            httpServletRequest.setAttribute("message",
                                            "Error while performing finder. : "
                                            +
                                            ex.getMessage());
            return (actionMapping.findForward("unknown-error"));
        }
        return (actionMapping.findForward("fundFinderResultsList"));
    }
}

⌨️ 快捷键说明

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