package oracle.fodemo.storefront.store.service.server.serviceinterface;

import java.lang.reflect.Method;

import java.math.BigInteger;

import java.util.List;

import javax.ejb.Remote;
import javax.ejb.Stateless;

import javax.interceptor.Interceptors;

import oracle.fodemo.storefront.store.queries.common.CustomerInfoVOSDO;
import oracle.fodemo.storefront.store.queries.common.OrderInfoVOSDO;
import oracle.fodemo.storefront.store.service.common.serviceinterface.StoreFrontService;

import oracle.jbo.common.Diagnostic;
import oracle.jbo.common.sdo.SDOHelper;
import oracle.jbo.common.service.types.FindControl;
import oracle.jbo.common.service.types.FindCriteria;
import oracle.jbo.common.service.types.ProcessControl;
import oracle.jbo.common.service.types.ProcessData;
import oracle.jbo.server.svc.ServiceContextInterceptor;
import oracle.jbo.server.svc.ServiceImpl;
import oracle.jbo.service.errors.ServiceException;

import oracle.webservices.annotations.PortableWebService;

import weblogic.javaee.CallByReference;


// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Sun Oct 12 16:30:14 MDT 2008
// ---------------------------------------------------------------------
@Stateless(name="oracle.fodemo.storefront.store.service.common.StoreFrontServiceBean",
    mappedName="StoreFrontServiceBean")
@Remote(StoreFrontService.class)
@PortableWebService(targetNamespace="www.globalcompany.example.com",
    serviceName="StoreFrontService", portName="StoreFrontServiceSoapHttpPort",
    endpointInterface="oracle.fodemo.storefront.store.service.common.serviceinterface.StoreFrontService")
@CallByReference
@Interceptors( { ServiceContextInterceptor.class })
public class StoreFrontServiceImpl extends ServiceImpl implements StoreFrontService {
    private static boolean _isInited = false;

    /**
     * This is the default constructor (do not remove).
     */
    public StoreFrontServiceImpl() {
        init();
        setApplicationModuleDefName("oracle.fodemo.storefront.store.service.StoreServiceAM");
        setConfigurationName("StoreFrontService");
    }


    /**
     * Generated method. Do not modify. Do initialization in the constructor
     */
    protected void init() {
        if (_isInited) {
            return;
        }
        synchronized (StoreFrontServiceImpl.class) {
            if (_isInited) {
                return;
            }
            try {
                SDOHelper.INSTANCE.defineSchema("oracle/fodemo/storefront/store/service/common/serviceinterface/", "StoreFrontService.xsd");
                _isInited = true;
            } catch (Exception ex) {
                Diagnostic.printStackTrace(ex);
            }
        }
    }

    /**
     * deleteOrderInfoVOSDO: generated method. Do not modify.
     * @param orderInfoVO1
     * @throws ServiceException
     */
    public void deleteOrderInfoVOSDO(OrderInfoVOSDO orderInfoVO1) throws ServiceException {
        delete(orderInfoVO1, "OrderInfoVO1");
    }


    /**
     * findCustomerInfoVO1: generated method. Do not modify.
     */
    public List<CustomerInfoVOSDO> findCustomerInfoVO1(FindCriteria findCriteria,
                                                       FindControl findControl) throws ServiceException {
        return (List<CustomerInfoVOSDO>)find(findCriteria, findControl,
                                             "CustomerInfoVO1",
                                             CustomerInfoVOSDO.class);
    }

    /**
     * findCustomerInfoVO1CustomerInfoVOCriteria: generated method. Do not modify.
     */
    public List<CustomerInfoVOSDO> findCustomerInfoVO1CustomerInfoVOCriteria(FindCriteria findCriteria,
                                                                             String CustId,
                                                                             FindControl findControl) throws ServiceException {
        return (List<CustomerInfoVOSDO>)find(findCriteria, findControl,
                                             "CustomerInfoVO1",
                                             CustomerInfoVOSDO.class,
                                             "CustomerInfoVOCriteria",
                                             new NamedParam[] { new NamedParam("CustId",
                                                                               CustId) });
    }

    /**
     * getOrderInfoVOSDO: generated method. Do not modify.
     */
    public OrderInfoVOSDO getOrderInfoVOSDO(BigInteger orderId) throws ServiceException {
        return (OrderInfoVOSDO)get(new Object[] { orderId }, "OrderInfoVO1",
                                   OrderInfoVOSDO.class);
    }

    /**
     * createOrderInfoVOSDO: generated method. Do not modify.
     */
    public OrderInfoVOSDO createOrderInfoVOSDO(OrderInfoVOSDO orderInfoVO1) throws ServiceException {
        return (OrderInfoVOSDO)create(orderInfoVO1, "OrderInfoVO1");
    }

    /**
     * updateOrderInfoVOSDO: generated method. Do not modify.
     */
    public OrderInfoVOSDO updateOrderInfoVOSDO(OrderInfoVOSDO orderInfoVO1) throws ServiceException {
        return (OrderInfoVOSDO)update(orderInfoVO1, "OrderInfoVO1");
    }

    /**
     * mergeOrderInfoVOSDO: generated method. Do not modify.
     */
    public OrderInfoVOSDO mergeOrderInfoVOSDO(OrderInfoVOSDO orderInfoVO1) throws ServiceException {
        return (OrderInfoVOSDO)merge(orderInfoVO1, "OrderInfoVO1");
    }

    /**
     * findOrderInfoVOSDO: generated method. Do not modify.
     */
    public List<OrderInfoVOSDO> findOrderInfoVOSDO(FindCriteria findCriteria,
                                                   FindControl findControl) throws ServiceException {
        return (List<OrderInfoVOSDO>)find(findCriteria, findControl,
                                          "OrderInfoVO1",
                                          OrderInfoVOSDO.class);
    }

    /**
     * processOrderInfoVOSDO: generated method. Do not modify.
     */
    public List<OrderInfoVOSDO> processOrderInfoVOSDO(String changeOperation,
                                                      List<OrderInfoVOSDO> orderInfoVO1,
                                                      ProcessControl processControl) throws ServiceException {
        return (List<OrderInfoVOSDO>)process(changeOperation, processControl,
                                             orderInfoVO1, "OrderInfoVO1");
    }

    /**
     * processCSOrderInfoVOSDO: generated method. Do not modify.
     */
    public ProcessData processCSOrderInfoVOSDO(ProcessData processData,
                                               ProcessControl processControl) throws ServiceException {
        return processChangeSummary(processData, processControl, "OrderInfoVO1");
    }
}
