com.ibm.commerce.me.datatype

Class StoreHelper

  • java.lang.Object
    • com.ibm.commerce.me.datatype.StoreHelper


  • public class StoreHelper
    extends java.lang.Object
    The class contains utility methods related to the store and the catalog.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright field
    • Constructor Summary

      Constructors 
      Constructor and Description
      StoreHelper() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.Long findCatalogId(long buyerId, long supplierId, java.lang.Integer protocolId)
      Finds the catalog in a store that belongs to a supplier, a buyer, and a protocol through accessing the B2BMAPPING table.
      static java.lang.Long findMemberGroupId(long buyerId, long supplierId, java.lang.Integer protocolId)
      Finds the memberGroup given the supplier ID, the buyer ID, and the protocol ID.
      static java.lang.Integer findStoreId(java.lang.Long supplierId, java.lang.Long catalogId, java.lang.Long contractId)
      Find the store that the given catalog belongs to.
      static java.lang.String getResponseErrorView(java.lang.String protocolId, java.lang.String buyerId, java.lang.String message)
      This method gets the response error view based on a protocol, buyer, and message.
      static java.lang.String getResponseViewName(java.lang.String protocolId, java.lang.String buyerId, java.lang.String message)
      This method gets the response view name based on a protocol, buyer, and message.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright field
        See Also:
        Constant Field Values
    • Constructor Detail

      • StoreHelper

        public StoreHelper()
    • Method Detail

      • findCatalogId

        public static java.lang.Long findCatalogId(long buyerId,
                                                   long supplierId,
                                                   java.lang.Integer protocolId)
        Finds the catalog in a store that belongs to a supplier, a buyer, and a protocol through accessing the B2BMAPPING table.
        Parameters:
        buyerId - the buyer ID used to find the catalog
        supplierId - the supplier ID used to find the catalog
        protocolId - the protocol ID used to find the catalog
        Returns:
        The catalog ID based on the buyer ID, supplier ID, and protocol ID
      • findMemberGroupId

        public static java.lang.Long findMemberGroupId(long buyerId,
                                                       long supplierId,
                                                       java.lang.Integer protocolId)
        Finds the memberGroup given the supplier ID, the buyer ID, and the protocol ID.
        Parameters:
        buyerId - the buyer ID used to find the member group
        supplierId - the supplier ID used to find the member group
        protocolId - the protocol ID used to find the member group
        Returns:
        The Member Group ID based on the buyer ID, supplier ID, and protocol ID
      • findStoreId

        public static java.lang.Integer findStoreId(java.lang.Long supplierId,
                                                    java.lang.Long catalogId,
                                                    java.lang.Long contractId)
        Find the store that the given catalog belongs to. The logic of getting the store ID is: get the member ID from the CATALOG table and get the store entity ID from the STOREENTITY table.
        Parameters:
        supplierId - the member ID for the supplier.
        catalogId - the ID used to identify a catalog.
        contractId - the ID used to identify a specify contract.
        Returns:
        The store ID of the store based on the input parameters.
      • getResponseErrorView

        public static java.lang.String getResponseErrorView(java.lang.String protocolId,
                                                            java.lang.String buyerId,
                                                            java.lang.String message)
        This method gets the response error view based on a protocol, buyer, and message.
        Parameters:
        protocolId - a code used to identify a specific protocol.
        buyerId - the organization ID for the buyer organization.
        message - a name used to identify a view.
        Returns:
        the response error view name when the transaction is not completed successfully.
      • getResponseViewName

        public static java.lang.String getResponseViewName(java.lang.String protocolId,
                                                           java.lang.String buyerId,
                                                           java.lang.String message)
        This method gets the response view name based on a protocol, buyer, and message.
        Parameters:
        protocolId - a code used to identify a specific protocol.
        buyerId - the organization ID for the buyer organization.
        message - a name used to identify a view.
        Returns:
        the response view name when the transaction completes successfully.