com.ibm.commerce.tools.optools.order.helpers
Class OrderProductSearchAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractSessionAccessBean
              |
              +--com.ibm.commerce.tools.optools.order.helpers.OrderProductSearchAccessBean
All Implemented Interfaces:
java.io.Serializable

public class OrderProductSearchAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractSessionAccessBean

This bean is used for searching products that are currently available for sale in the store.

It is mainly used by the Commerce Accelerator orders and returns User Interface.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
OrderProductSearchAccessBean()
          Default constructor.
OrderProductSearchAccessBean(javax.ejb.EJBObject object)
          Creates an access bean for the specified EJB.
 
Method Summary
 com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String productSku, java.lang.String productName, java.lang.String productDescription, java.lang.String orderBy, java.lang.String langId, java.lang.String storeId)
          Searches the catalog and return a list of products that are currently available for sale depending on the criterias specified.
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
defaultJNDIName, defaultNameServiceType, defaultNameServiceURL, getEJBRef, getGlobalHome, getHome, getInit_GlobalNameServiceTypeName, getInit_GlobalNameServiceURLName, getInit_JNDIName, getInit_NameServiceTypeName, getInit_NameServiceURLName, getInitContext, getInitContext, instantiateEJB, resetEJBRef, resetHomeCache, setEJBRef, setInit_GlobalNameServiceTypeName, setInit_GlobalNameServiceURLName, setInit_JNDIName, setInit_NameServiceTypeName, setInit_NameServiceURLName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderProductSearchAccessBean

public OrderProductSearchAccessBean()

Default constructor.


OrderProductSearchAccessBean

public OrderProductSearchAccessBean(javax.ejb.EJBObject object)
                             throws java.rmi.RemoteException

Creates an access bean for the specified EJB.

Parameters:
object - The EJB Object used for the access bean construction.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
Method Detail

findItemBySkuNameDesc

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String productSku,
                                                                                           java.lang.String productName,
                                                                                           java.lang.String productDescription,
                                                                                           java.lang.String orderBy,
                                                                                           java.lang.String langId,
                                                                                           java.lang.String storeId)
                                                                                    throws javax.naming.NamingException,
                                                                                           java.sql.SQLException,
                                                                                           javax.ejb.CreateException,
                                                                                           java.rmi.RemoteException,
                                                                                           javax.ejb.FinderException

Searches the catalog and return a list of products that are currently available for sale depending on the criterias specified.

The SQL query executed depends on the input parameters. A sample query where all input parameters are given:

SELECT CATENTRY.CATENTRY_ID, CATENTRY.PARTNUMBER, CATENTDESC.NAME, CATENTDESC.SHORTDESCRIPTION FROM CATENTRY, CATENTDESC, STORECENT WHERE (CATENTRY.BUYABLE IS NULL OR CATENTRY.BUYABLE <> 0) AND (CATENTRY.MARKFORDELETE <> 1) AND (CATENTRY.PUBLISHED = 1) AND (CATENTRY.CATENTRY_ID = CATENTDESC.CATENTRY_ID) AND (CATENTRY.CATENTRY_ID = STORECENT.CATENTRY_ID) AND (CATENTRY.CATENTRYTYPE_ID = 'ItemBean')

AND (STORECENT.STOREENT_ID = ? OR STORECENT.STOREENT_ID = ?) AND (CATENTRY.PARTNUMBER LIKE ? ESCAPE '\\') AND (CATENTRY.LANGUAGUE_ID = ?) AND (UPPER(CATENTDESC.NAME LIKE ? ESCAPE '\\')) AND (UPPER(CATENTDESC.SHORTDESCRIPTION LIKE ? ESCAPE '\\')) ORDER BY CATENTRY.PARTNUMBER

The possible values for orderBy are:

Parameters:
productSku - (Optional) The product SKU to search for.
productName - (Optional) The product name to search for.
productDescription - (Optional) The product description to search for.
orderBy - (Optional) The parameter to sort the resulting data by.
langId - (Optional) The language id. It is required if productName or productDescription is not null or empty.
storeId - Limit the search to the store specified.
Returns:
com.ibm.commerce.tools.optools.common.helpers.DynamicListData List of products that are available for sale depending on the search criteria
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception
java.sql.SQLException - The java.sql.SQLException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception