com.ibm.commerce.negotiation.operation

Class Helper

  • java.lang.Object
    • com.ibm.commerce.negotiation.operation.Helper


  • public class Helper
    extends java.lang.Object
    Helper utility class.
    • Field Summary

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

      Constructors 
      Constructor and Description
      Helper()
      Helper constructor comment.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static com.ibm.commerce.negotiation.objimpl.BidDataLight convertToBidDataLight(AutoBidAccessBean abAutoBid, BidAccessBean abBid)
      Returns a biddatalight object that has the contain of the given bid access bean
      static com.ibm.commerce.negotiation.objimpl.BidDataLight convertToBidDataLight(BidAccessBean param)
      Returns a biddatalight object that has the contain of the given bid access bean
      static java.lang.String getCatalogEntryType(java.lang.String catEntryId)
      Gets catalog entry type
      static java.lang.Integer getStoreIdForAuction(java.lang.Long auctid)
      Gets store ID in which the auction is created.
      static java.sql.Timestamp getTimestampByYearMonth(java.lang.String year, java.lang.String month)
      Returns a timestamp object has the specified year and month, null if anything wrong.
      static boolean isDigit(java.lang.String s)
      Determines if the input string represents a numeric value containing only characters 0 thru 9.
      static boolean isSupportedLanguage(StoreAccessBean store, java.lang.Integer langid)
      To check if the specified language is supported by the store.
      static java.lang.String parseNumeric(java.lang.String alphaNumStr)
      Parse the input string and remove all non-numeric characters.
      static java.util.Hashtable parseNVPairs(java.lang.String str, java.lang.String del)
      Parse up a string that contains name/value pair
      • 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 notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Helper

        public Helper()
        Helper constructor comment.
    • Method Detail

      • convertToBidDataLight

        public static com.ibm.commerce.negotiation.objimpl.BidDataLight convertToBidDataLight(BidAccessBean param)
        Returns a biddatalight object that has the contain of the given bid access bean
        Parameters:
        param - com.ibm.commerce.negotiation.objects.BidAccessBean
        Returns:
        BidDataLight - return null any exception is caught.
      • convertToBidDataLight

        public static com.ibm.commerce.negotiation.objimpl.BidDataLight convertToBidDataLight(AutoBidAccessBean abAutoBid,
                                                                                              BidAccessBean abBid)
        Returns a biddatalight object that has the contain of the given bid access bean
        Parameters:
        abAutoBid - com.ibm.commerce.negotiation.objects.AutoBidAccessBean - optional
        abBid - com.ibm.commerce.negotiation.objects.BidAccessBean - required,
        Returns:
        BidDataLight - return null any exception is caught.
      • getCatalogEntryType

        public static java.lang.String getCatalogEntryType(java.lang.String catEntryId)
        Gets catalog entry type
        Parameters:
        catEntryId - java.lang.String
        Returns:
        String
      • getStoreIdForAuction

        public static java.lang.Integer getStoreIdForAuction(java.lang.Long auctid)
        Gets store ID in which the auction is created.
        Parameters:
        auctid - java.lang.Long
        Returns:
        java.lang.Integer store ID
      • getTimestampByYearMonth

        public static java.sql.Timestamp getTimestampByYearMonth(java.lang.String year,
                                                                 java.lang.String month)
        Returns a timestamp object has the specified year and month, null if anything wrong.
        Parameters:
        year - String year 2001 is "2001"
        month - String January is "01" or "1"
        Returns:
        java.sql.Timestamp
      • isDigit

        public static boolean isDigit(java.lang.String s)
        Determines if the input string represents a numeric value containing only characters 0 thru 9.
        Parameters:
        s - java.lang.String
        Returns:
        boolean - =true if input string represents an all numeric characters. = false otherwise.
      • isSupportedLanguage

        public static boolean isSupportedLanguage(StoreAccessBean store,
                                                  java.lang.Integer langid)
        To check if the specified language is supported by the store.
        Parameters:
        store - com.ibm.commerce.common.objects.StoreAccessBean
        langid - java.lang.Integer
        Returns:
        boolean
      • parseNumeric

        public static java.lang.String parseNumeric(java.lang.String alphaNumStr)
        Parse the input string and remove all non-numeric characters.
        Parameters:
        alphaNumStr - String - AlphaNumeric string to be stripped of alpha characters.
        Returns:
        String - Numeric string. An empty string is returned if input string is empty, A null string is returned for null input arguments.
      • parseNVPairs

        public static java.util.Hashtable parseNVPairs(java.lang.String str,
                                                       java.lang.String del)
        Parse up a string that contains name/value pair
        Parameters:
        str - java.lang.String
        del - java.lang.String : the delimiter , default is semicolon
        Returns:
        java.util.Hashtable