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

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

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

Constructor Summary
OrderSearchAccessBean()
Default constructor.
OrderSearchAccessBean(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 findOrderAccountIDsForCustomer(java.lang.String customer)
This methods retrieves all account ids that the user or the user's organization holds.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findOrdersForStore(java.lang.Long storeId, java.lang.String orderBy, java.lang.String orderId, java.lang.String userLogin, java.lang.String userId, java.lang.String orderStatus, java.lang.String accountId, java.lang.Integer start, java.lang.Integer maxLength)
This methods retrieves the IDs of the orders in the store specified by the storeId.
com.ibm.commerce.tools.optools.common.helpers.DynamicListData findOrdersForStoreAdvanced(java.lang.Long storeId, java.lang.String orderBy, java.lang.String orderId, java.lang.String userLogin, java.lang.String userLogonSearchType, java.lang.String userId, java.lang.String orderStatus, java.lang.String orgId, java.lang.Integer start, java.lang.Integer maxLength, java.sql.Timestamp orderDateSD, java.sql.Timestamp orderDateED, java.sql.Timestamp lastUpdateSD, java.sql.Timestamp lastUpdateED, java.lang.String addr_firstName, java.lang.String addr_FNSearchType, java.lang.String addr_lastName, java.lang.String addr_LNSearchType, java.lang.String addr_address1, java.lang.String addr_A1SearchType, java.lang.String addr_zipcode, java.lang.String addr_ZCSearchType, java.lang.String addr_email1, java.lang.String addr_E1SearchType, java.lang.String addr_phone1, java.lang.String numToFetch)
Finds the orders that match the search criterias provided one or more of the following parameters: orderId userLogin userId orgId orderStatus orderDateSD orderDateED lastUpdateSD lastUpdateED addr_firstName addr_lastName addr_address1 addr_zipcode addr_email1 addr_phone1
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

OrderSearchAccessBean

public OrderSearchAccessBean()

Default constructor. Maps to findByPrimaryKey.


OrderSearchAccessBean

public OrderSearchAccessBean(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

findOrderAccountIDsForCustomer

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findOrderAccountIDsForCustomer(java.lang.String customer)
                                                                                             throws javax.naming.NamingException,
                                                                                                    java.sql.SQLException,
                                                                                                    java.rmi.RemoteException,
                                                                                                    javax.ejb.ObjectNotFoundException,
                                                                                                    javax.ejb.CreateException

This methods retrieves all account ids that the user or the user's organization holds.

SELECT TRADING_ID FROM PARTICIPNT WHERE MEMBER_ID = ? AND PARTROLE_ID = 5 SELECT TRADING_ID FROM PARTICIPNT, MBRREL WHERE PARTROLE_ID = 5 AND DESCENDANT_ID = ? AND ANCESTOR_ID = MEMBER_ID AND SEQUENCE IN (SELECT MAX(SEQUENCE) FROM MBRREL WHERE DESCENDANT_ID = ? AND ANCESTOR_ID NOT IN (-2001))

Parameters:
customer - The ID of user
Returns:
com.ibm.commerce.tools.optools.common.helpers.DynamicListData
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception
java.sql.SQLException - The java.sql.SQLException exception
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.ObjectNotFoundException - The javax.ejb.ObjectNotFoundException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception

findOrdersForStore

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findOrdersForStore(java.lang.Long storeId,
                                                                                        java.lang.String orderBy,
                                                                                        java.lang.String orderId,
                                                                                        java.lang.String userLogin,
                                                                                        java.lang.String userId,
                                                                                        java.lang.String orderStatus,
                                                                                        java.lang.String accountId,
                                                                                        java.lang.Integer start,
                                                                                        java.lang.Integer maxLength)
                                                                                 throws javax.naming.NamingException,
                                                                                        java.sql.SQLException,
                                                                                        java.rmi.RemoteException,
                                                                                        javax.ejb.ObjectNotFoundException,
                                                                                        javax.ejb.CreateException

This methods retrieves the IDs of the orders in the store specified by the storeId. Optional parameters can be passed in to narrow the search. A start and maxLength are required to limit the number of the order IDs to be returned.

SELECT ORDERS_ID, LOGONID, TIMEPLACED, LASTUPDATE, TOTALPRODUCT+TOTALADJUSTMENT+TOTALSHIPPING+TOTALTAX+TOTALTAXSHIPPING AS TOTAL FROM ORDERS LEFT OUTER JOIN USERREG ON MEMBER_ID=USERS_ID

WHERE STOREENT_ID=? AND ORDERS_ID IN (?) AND ORDERS.STATUS IN (?) AND ORDERS.MEMBER_ID IN (?) AND (LOGONID LIKE ? ESCAPE '\\') AND ORDERS.ORGENTITY_ID IN (SELECT DESCENDANT_ID FROM MBRREL, ORGENTITY WHERE MBRREL.DESCENDANT_ID = ORGENTITY.ORGENTITY_ID AND ((ANCESTOR_ID = ? AND ORGENTITY.ORGENTITYTYPE = 'OU') OR ORGENTITY.ORGENTITY_ID = ?)) ORDER BY ?

The possible values for orderStatus are:

  • "A" - Payment review
  • "B" - Backordered
  • "C" - Complete
  • "D" - Payment received
  • "E" - Edit
  • "F" - remote fulfillment
  • "G" - Pending remote fulfillment
  • "I" - Submitted
  • "L" - No inventory
  • "M" - Pending payment approval
  • "N" - Approval denied
  • "P" - Pending
  • "R" - Released to fulfillment
  • "S" - Shipped
  • "T" - Temperory order
  • "W" - Pendinf approval
  • "X" - Canceled
  • "all" - all order not in these statuses, 'P','T','Y','Q','Z'.

The possible values for orderBy are:

  • "orderId"
  • "logonId"
  • "orderDate"
  • "modifiedDate"
  • "total"
Parameters:
storeId - The ID of the store
orderBy - (Optional) The orderby column of the search result
orderId - (Optional) The ID of the order
userLogin - (Optional) The login name of the user
userId - (Optional) The ID of the user
orderStatus - (Optional) The status of the orders
accountId - (Optional) The ID of the organization who submit the orders. This is only used in B2B store.
start - The starting index of the result set that will be fetched.
maxLength - The maximum number rows returns starting from the start of the resultset.
Returns:
com.ibm.commerce.tools.optools.common.helpers.DynamicListData
Throws:
javax.naming.NamingException - The javax.naming.NamingException exception
java.sql.SQLException - The java.sql.SQLException exception
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.ObjectNotFoundException - The javax.ejb.ObjectNotFoundException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception

findOrdersForStoreAdvanced

public com.ibm.commerce.tools.optools.common.helpers.DynamicListData findOrdersForStoreAdvanced(java.lang.Long storeId,
                                                                                                java.lang.String orderBy,
                                                                                                java.lang.String orderId,
                                                                                                java.lang.String userLogin,
                                                                                                java.lang.String userLogonSearchType,
                                                                                                java.lang.String userId,
                                                                                                java.lang.String orderStatus,
                                                                                                java.lang.String orgId,
                                                                                                java.lang.Integer start,
                                                                                                java.lang.Integer maxLength,
                                                                                                java.sql.Timestamp orderDateSD,
                                                                                                java.sql.Timestamp orderDateED,
                                                                                                java.sql.Timestamp lastUpdateSD,
                                                                                                java.sql.Timestamp lastUpdateED,
                                                                                                java.lang.String addr_firstName,
                                                                                                java.lang.String addr_FNSearchType,
                                                                                                java.lang.String addr_lastName,
                                                                                                java.lang.String addr_LNSearchType,
                                                                                                java.lang.String addr_address1,
                                                                                                java.lang.String addr_A1SearchType,
                                                                                                java.lang.String addr_zipcode,
                                                                                                java.lang.String addr_ZCSearchType,
                                                                                                java.lang.String addr_email1,
                                                                                                java.lang.String addr_E1SearchType,
                                                                                                java.lang.String addr_phone1,
                                                                                                java.lang.String numToFetch)
                                                                                         throws javax.naming.NamingException,
                                                                                                javax.ejb.ObjectNotFoundException,
                                                                                                javax.ejb.CreateException,
                                                                                                java.rmi.RemoteException,
                                                                                                java.sql.SQLException
Finds the orders that match the search criterias provided one or more of the following parameters: orderId userLogin userId orgId orderStatus orderDateSD orderDateED lastUpdateSD lastUpdateED addr_firstName addr_lastName addr_address1 addr_zipcode addr_email1 addr_phone1
Parameters:
storeId - The store id
orderBy - The orderBy column
orderId - The order id
userLogin - The customer logon id
userLogonSearchType - The type of search to perform on user logon
userId - The customer reference number
orderStatus - The order status
orgId - The organization id
start - The start index of the row to return
orderDateSD - The search timeplaced start date
orderDateED - The search timeplaced end date
lastUpdateSD - The search lastupdate start date
lastUpdateED - The search lastupdate end date
addr_firstName - The first name of the billing or shipping address
addr_FNSearchType - The type of search to perform on first name
addr_lastName - The last name of the billing or shipping address
addr_LNSearchType - The type of search to perform on last name
addr_address1 - The address1 of the billing or shipping address
addr_A1SearchType - The type of search to perform on address1
addr_zipcode - The zipcode of the billing or shipping address
addr_ZCSearchType - The type of search to perform on zipcode
addr_email1 - The email1 of the billing or shipping address
addr_E1SearchType - The type of search to perform on email1
addr_phone1 - The phone1 of the billing or shipping address
numToFetch - The maximum fetch size when querying the database
Returns:
The list of orders searched.
Throws:
NamingException - If the name cannot be found.
RemoteException - If the database cannot be accessed.
SQLException - If the SQL is invalid.
ObjectNotFoundException - If the orders cannot be found.
javax.ejb.CreateException

Feedback