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

java.lang.Object
  com.ibm.ivj.ejb.runtime.AbstractSessionAccessBean
      com.ibm.commerce.tools.optools.order.helpers.OrderProductSearchAccessBean

public class OrderProductSearchAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractSessionAccessBean
See Also:
Serialized Form

Constructor Summary
OrderProductSearchAccessBean()
Default constructor.
OrderProductSearchAccessBean(javax.ejb.EJBObject o)
This method was generated by the VisualAge for Java Access Bean SmartGuide.
Method Summary
protected java.lang.String defaultJNDIName()
This method was generated by the VisualAge for Java Access Bean SmartGuide.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String SKULike, java.lang.String nameLike, java.lang.String descLike, 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.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String SKULike, java.lang.String nameLike, java.lang.String descLike, java.lang.String orderBy, java.lang.String langId, java.util.Vector storeIds)
Performs a fuzzy search on SKU, name, and description.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDescWithMax(java.lang.String SKULike, java.lang.String nameLike, java.lang.String descLike, java.lang.String orderBy, java.lang.String langId, java.lang.String storeId, java.lang.String maxMatches)
Searches the catalog and return a list of products that are currently available for sale depending on the criterias specified.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDescWithMax(java.lang.String SKULike, java.lang.String nameLike, java.lang.String descLike, java.lang.String orderBy, java.lang.String langId, java.util.Vector storeIds, java.lang.String maxMatches)
Performs a fuzzy search on SKU, name, and description.
protected void instantiateEJB()
This method was generated by the VisualAge for Java Access Bean SmartGuide.
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 o)
                             throws java.rmi.RemoteException
This method was generated by the VisualAge for Java Access Bean SmartGuide. Warning: Modifications will be lost when this part is regenerated.
Method Detail

defaultJNDIName

protected java.lang.String defaultJNDIName()
This method was generated by the VisualAge for Java Access Bean SmartGuide. Warning: Modifications will be lost when this part is regenerated.

instantiateEJB

protected void instantiateEJB()
                       throws javax.ejb.CreateException,
                              java.rmi.RemoteException,
                              javax.naming.NamingException
This method was generated by the VisualAge for Java Access Bean SmartGuide. Warning: Modifications will be lost when this part is regenerated.
Throws:
javax.ejb.CreateException
java.rmi.RemoteException
javax.naming.NamingException

findItemBySkuNameDesc

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String SKULike,
                                                                                           java.lang.String nameLike,
                                                                                           java.lang.String descLike,
                                                                                           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:

  • "nameLike"
  • "partNumber"
  • "shortDescription"
Parameters:
SKULike - (Optional) The product SKU to search for.
nameLike - (Optional) The product name to search for.
descLike - (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 nameLike or descLike 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

findItemBySkuNameDesc

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDesc(java.lang.String SKULike,
                                                                                           java.lang.String nameLike,
                                                                                           java.lang.String descLike,
                                                                                           java.lang.String orderBy,
                                                                                           java.lang.String langId,
                                                                                           java.util.Vector storeIds)
                                                                                    throws javax.naming.NamingException,
                                                                                           javax.ejb.FinderException,
                                                                                           javax.ejb.CreateException,
                                                                                           java.rmi.RemoteException,
                                                                                           java.sql.SQLException
Performs a fuzzy search on SKU, name, and description.
Parameters:
SKULike - The SKU search string.
nameLike - The name search string.
descLike - The description search string.
orderBy - The sorting parameter.
langId - The language ID.
Returns:
The list of products searched.
Throws:
SQLException - If the SQL is not valid.
NamingExcpetion - If the name cannot be found.
FinderException - If the products cannot be found.
CreateException - If the instance cannot be created.
RemoteException - If the database cannot be accessed.
javax.naming.NamingException

findItemBySkuNameDescWithMax

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDescWithMax(java.lang.String SKULike,
                                                                                                  java.lang.String nameLike,
                                                                                                  java.lang.String descLike,
                                                                                                  java.lang.String orderBy,
                                                                                                  java.lang.String langId,
                                                                                                  java.util.Vector storeIds,
                                                                                                  java.lang.String maxMatches)
                                                                                           throws javax.naming.NamingException,
                                                                                                  javax.ejb.FinderException,
                                                                                                  javax.ejb.CreateException,
                                                                                                  java.rmi.RemoteException,
                                                                                                  java.sql.SQLException
Performs a fuzzy search on SKU, name, and description.
Parameters:
SKULike - The SKU search string.
nameLike - The name search string.
descLike - The description search string.
maxMatches - The maximum number of matches to search for.
orderBy - The sorting parameter.
langId - The language ID.
Returns:
The list of products searched.
Throws:
SQLException - If the SQL is not valid.
NamingExcpetion - If the name cannot be found.
FinderException - If the products cannot be found.
CreateException - If the instance cannot be created.
RemoteException - If the database cannot be accessed.
javax.naming.NamingException

findItemBySkuNameDescWithMax

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findItemBySkuNameDescWithMax(java.lang.String SKULike,
                                                                                                  java.lang.String nameLike,
                                                                                                  java.lang.String descLike,
                                                                                                  java.lang.String orderBy,
                                                                                                  java.lang.String langId,
                                                                                                  java.lang.String storeId,
                                                                                                  java.lang.String maxMatches)
                                                                                           throws javax.naming.NamingException,
                                                                                                  javax.ejb.FinderException,
                                                                                                  javax.ejb.CreateException,
                                                                                                  java.rmi.RemoteException,
                                                                                                  java.sql.SQLException

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 '\\')) FETCH FIRST n ROWS ONLY ORDER BY CATENTRY.PARTNUMBER

The possible values for orderBy are:

  • "nameLike"
  • "partNumber"
  • "shortDescription"
Parameters:
SKULike - (Optional) The product SKU to search for.
nameLike - (Optional) The product name to search for.
descLike - (Optional) The product description to search for.
maxMatches - (Optional) The maximum number of matches to search for.
orderBy - (Optional) The parameter to sort the resulting data by.
langId - (Optional) The language id. It is required if nameLike or descLike 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

Feedback