pojopricingbiz.java~1~

来自「EJB+Hibernate+Spring 电信计费系统」· JAVA~1~ 代码 · 共 93 行

JAVA~1~
93
字号
package tarena.netctoss.biz;

import java.util.*;

import tarena.netctoss.dao.*;
import tarena.netctoss.exception.*;
import tarena.netctoss.model.*;

public class POJOPricingBIZ implements PricingBIZ {

    private PricingDAO pricingDAO;
    /**
     * addPricing
     *
     * @param pricing Tpricing
     * @throws InfrastructureException
     * @throws RepeatBaseFeeAndRateFeeException
     * @todo Implement this tarena.netctoss.biz.PricingBIZ method
     */
    public void addPricing(Tpricing pricing) throws InfrastructureException,
            RepeatBaseFeeAndRateFeeException {
        if(pricing == null)
            return;

        boolean flag = pricingDAO.selectPricingByBaseFeeAndRateFee(pricing.getBaseFee(),pricing.getRateFee());
        if(flag){
            throw new RepeatBaseFeeAndRateFeeException("base and rate is repeat");
        }else{
            pricingDAO.insertPricing(pricing);
        }

    }

    /**
     * getPricingById
     *
     * @param pricingId Long
     * @return Tpricing
     * @throws InfrastructureException
     * @todo Implement this tarena.netctoss.biz.PricingBIZ method
     */
    public Tpricing getPricingById(Long pricingId) throws
            InfrastructureException {
        if(pricingId == null)
            return ;

        Tpricing pricing = pricingDAO.selectPricingById(pricingId);

        return pricing;
    }

    /**
     * listAllPricing
     *
     * @return Collection
     * @throws InfrastructureException
     * @todo Implement this tarena.netctoss.biz.PricingBIZ method
     */
    public Collection listAllPricing() throws InfrastructureException {
        return null;
    }

    /**
     * modifyPricing
     *
     * @param pricing Tpricing
     * @throws InfrastructureException
     * @throws RepeatBaseFeeAndRateFeeException
     * @todo Implement this tarena.netctoss.biz.PricingBIZ method
     */
    public void modifyPricing(Tpricing pricing) throws InfrastructureException,
            RepeatBaseFeeAndRateFeeException {
    }

    /**
     * removePricing
     *
     * @param pricingId Long[]
     * @throws InfrastructureException
     * @todo Implement this tarena.netctoss.biz.PricingBIZ method
     */
    public void removePricing(Long[] pricingId) throws InfrastructureException {
    }

    public PricingDAO getPricingDAO() {
        return pricingDAO;
    }

    public void setPricingDAO(PricingDAO pricingDAO) {
        this.pricingDAO = pricingDAO;
    }
}

⌨️ 快捷键说明

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