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

📄 funddelegate.java

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

import com.fund.ServiceLocator;
import com.fund.ServiceLocatorException;

/**
 *
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class FundDelegate {
    /**
     * fundSessionFacadeHome
     */
    private FundSessionFacadeHome fundSessionFacadeHome;
    /**
     * fundSessionFacade
     */
    private FundSessionFacade fundSessionFacade;

    /**
     *
     * @throws Exception e
     */
    public FundDelegate() throws Exception {
        initializeFundSessionFacadeHome();
        fundSessionFacade = fundSessionFacadeHome.create();
    }

    /**
     *
     * @param fundDto FundDto
     * @throws Exception e
     */
    public void createFund(FundDto fundDto) throws Exception {
        fundSessionFacade.createFund(fundDto);
    }

    /**
     *
     * @param fundNo Integer
     * @throws Exception e
     */
    public void removeFund(Integer fundNo) throws Exception {
        fundSessionFacade.removeFund(fundNo);
    }

    /**
     *
     * @param fundDto FundDto
     * @throws Exception e
     */
    public void removeFund(FundDto fundDto) throws Exception {
        fundSessionFacade.removeFund(fundDto);
    }

    /**
     *
     * @param fundDto FundDto
     * @throws Exception e
     */
    public void updateFund(FundDto fundDto) throws Exception {
        fundSessionFacade.updateFund(fundDto);
    }

    /**
     *
     * @param fundDtos FundDto[]
     * @throws Exception e
     */
    public void updateFunds(FundDto[] fundDtos) throws Exception {
        fundSessionFacade.updateFunds(fundDtos);
    }

    /**
     *
     * @param fundNo Integer
     * @return FundDto
     * @throws Exception e
     */
    public FundDto fundFindByPrimaryKey(Integer fundNo) throws Exception {
        return fundSessionFacade.fundFindByPrimaryKey(fundNo);
    }

    /**
     *
     * @param fundName String
     * @return FundDto
     * @throws Exception e
     */
    public FundDto fundFindByName(String fundName) throws Exception {
        return fundSessionFacade.fundFindByName(fundName);
    }

    /**
     *
     * @return FundDto[]
     * @throws Exception e
     */
    public FundDto[] fundFindGetNormallFunds() throws Exception {
        return fundSessionFacade.fundFindGetNormallFunds();
    }

    /**
     *
     * @throws Exception e
     */
    private void initializeFundSessionFacadeHome() throws Exception {
        String FACADE_NAME = "FundSessionFacade";
        Class FACADE_CLASS = com.fund.fund.FundSessionFacadeHome.class;
        if (fundSessionFacadeHome == null) {
            try {
                ServiceLocator locator = ServiceLocator.getInstance();
                fundSessionFacadeHome = (FundSessionFacadeHome) locator.
                                        getEjbHome(FACADE_NAME, FACADE_CLASS);
                if (fundSessionFacadeHome == null) {
                    throw new Exception("Did not get home for " + FACADE_NAME);
                }
            } catch (ServiceLocatorException e) {
                throw new Exception(e.getMessage());
            }
        }
    }
}

⌨️ 快捷键说明

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