com.ibm.commerce.account.util

Class AccountTCHelper

  • java.lang.Object
    • com.ibm.commerce.account.util.AccountTCHelper


  • public class AccountTCHelper
    extends java.lang.Object
    Reserved for IBM internal use.
    • Constructor Summary

      Constructors 
      Constructor and Description
      AccountTCHelper()
      Constructor for AccountTCHelper.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long create(java.lang.Object abTC)
      This method will invoke the corresponding creating method based on the type of the input object.
      java.lang.Long create(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
      This method creates the credit line which is used for the specified Payment term and condition.
      java.lang.Long create(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
      This method creates the buyer purchase order.
      java.lang.Long create(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
      This method creates the buyer purchase order.
      java.lang.Long delete(java.lang.Object abTC)
      This method will invoke the corresponding deleting method based on the type of the input object.
      java.lang.Long delete(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
      This method will set the credit line which belongs to this specified payment term and condition to "suspended".
      java.lang.Long delete(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
      This method will set the buyer purchase order which belongs to the specified term and condition to the state "Closed".
      java.lang.Long delete(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
      This method will set the buyer purchase order which belongs to the specified term and condition to the state "Closed".
      static AccountTCHelper getInstance()
      Returns an instance of this class.
      java.lang.String getSQLForFindBuzOrgEntityByOrgName(int searchType, java.lang.String searchKeyword)
      Construct part of an SQL query string to retrieve all business organization entities that match to the search criteria.
      boolean isSearchStringFound(int searchType, java.lang.String searchFor, java.lang.String searchIn)
      Is a search string contained in a give string.
      java.lang.Long update(java.lang.Object abTC)
      This method will invoke the corresponding updating method based on the type of the input object.
      java.lang.Long update(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
      This method will update the credit line which belongs to this specified payment term and condition.
      java.lang.Long update(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
      This method will update the buyer purchase order which belongs to the specified term and condition.
      java.lang.Long update(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
      This method will update the buyer purchase order which belongs to the specified term and condition.
      • Methods inherited from class java.lang.Object

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

      • BUYERPO_ACTIVE

        public static final java.lang.Integer BUYERPO_ACTIVE
        The constant for buyer purchase order type "Active". This maps to the column of buyerpo table.
      • BUYERPO_CLOSED

        public static final java.lang.Integer BUYERPO_CLOSED
        The constant for buyer purchase order type "Closed". This maps to the column of buyerpo table.
      • BUYERPO_UNDEFINED

        public static final java.lang.Integer BUYERPO_UNDEFINED
        The constant for buyer purchase order type "Undefined". This maps to the column of buyerpo table.
      • BUYERPOTYPE_BLANKETPO

        public static final java.lang.Integer BUYERPOTYPE_BLANKETPO
        The constant for the buyer purchase order type "Blanket PO". This maps to the buyerpotyp table.
      • BUYERPOTYPE_LIMITEDPO

        public static final java.lang.Integer BUYERPOTYPE_LIMITEDPO
        The constant for the buyer purchase order type "Limited PO". This maps to the buyerpotyp table.
      • BUYERPOTYPE_MULTIPLEUSEPO

        public static final java.lang.Integer BUYERPOTYPE_MULTIPLEUSEPO
        The constant for the buyer purchase order type "Multiple-use Individual PO (PO Number can be used by more than one order)". This maps to the buyerpotyp table.
      • BUYERPOTYPE_SINGLEUSEPO

        public static final java.lang.Integer BUYERPOTYPE_SINGLEUSEPO
        The constant for the buyer purchase order type "Single-use Individual PO ". This maps to the buyerpotyp table.
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class.
        See Also:
        Constant Field Values
      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CREDITLINE_ACTIVE

        public static final java.lang.Integer CREDITLINE_ACTIVE
        The constant for the credit line type "active". This maps to the state column of creditline table.
      • CREDITLINE_SUSPENDED

        public static final java.lang.Integer CREDITLINE_SUSPENDED
        The constant for the credit line type "suspended". This maps to the state column of creditline table.
      • CREDITLINE_UNDEFINED

        public static final java.lang.Integer CREDITLINE_UNDEFINED
        The constant for the credit line type "undefined/unknown". This maps to the state column of creditline table.
      • POLICYTYPE_PAYMENT

        public static final java.lang.String POLICYTYPE_PAYMENT
        The constant of the "Payment" type of the business policy.
        See Also:
        Constant Field Values
      • SEARCHTYPE_EXACT_MATCH

        public static final int SEARCHTYPE_EXACT_MATCH
        Exact Match with keyword search type constant
        See Also:
        Constant Field Values
      • SEARCHTYPE_IGNORE_CASE_BEGIN

        public static final int SEARCHTYPE_IGNORE_CASE_BEGIN
        Ignore case beginning with keyword search type constant
        See Also:
        Constant Field Values
      • SEARCHTYPE_IGNORE_CASE_CONTAIN

        public static final int SEARCHTYPE_IGNORE_CASE_CONTAIN
        Ignore case containing with keyword search type constant
        See Also:
        Constant Field Values
      • SEARCHTYPE_MATCH_CASE_BEGIN

        public static final int SEARCHTYPE_MATCH_CASE_BEGIN
        Match case beginning with keyword search type constant
        See Also:
        Constant Field Values
      • SEARCHTYPE_MATCH_CASE_CONTAIN

        public static final int SEARCHTYPE_MATCH_CASE_CONTAIN
        Match case containing with keyword search type constant
        See Also:
        Constant Field Values
      • SEARCHTYPE_SEARCH_ALL

        public static final int SEARCHTYPE_SEARCH_ALL
        Default search all search type constant
        See Also:
        Constant Field Values
    • Constructor Detail

      • AccountTCHelper

        public AccountTCHelper()
        Constructor for AccountTCHelper.
    • Method Detail

      • create

        public java.lang.Long create(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
                              throws java.lang.Exception
        This method creates the credit line which is used for the specified Payment term and condition. The state of the new creatd credit line will be set to "active".
        Parameters:
        abPaymentTC - a AccessBean object for payment term and condition.
        Returns:
        the ID of the new created credit line
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PAYMENT_TC_CREDIT_POLICY_ONLY if the payment term and condition referred to any other type of business policy instead of "Credit".
      • create

        public java.lang.Long create(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
                              throws java.lang.Exception
        This method creates the buyer purchase order. The state of the new created buyer purchase order is set to "Active".
        Parameters:
        abPOTC - a AccessBean object for purchase order blanket term and condition.
        Returns:
        the ID of the new created buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_INVALID_PO_NUMBER if the purchase order number is null or empty. Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during creating a buyer purchase order with type "Blanket".
      • create

        public java.lang.Long create(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
                              throws java.lang.Exception
        This method creates the buyer purchase order. The state of the new created buyer purchase order is set to "Active".
        Parameters:
        abPOTC - a AccessBean object for purchase order limited term and condition.
        Returns:
        the ID of the new created buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_INVALID_PO_NUMBER if the purchase order number is null or empty. Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during creating a buyer purchase order with type "Limited".
      • delete

        public java.lang.Long delete(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
                              throws java.lang.Exception
        This method will set the credit line which belongs to this specified payment term and condition to "suspended".
        Parameters:
        abPaymentTC - a AccessBean object for payment term and condition.
        Returns:
        the ID of the credit line
        Throws:
        java.lang.Exception - if an error occurred.
      • delete

        public java.lang.Long delete(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
                              throws java.lang.Exception
        This method will set the buyer purchase order which belongs to the specified term and condition to the state "Closed".
        Parameters:
        abPOTC - a AccessBean object for purchase order blanket term and condition.
        Returns:
        the ID of the buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during the process.
      • delete

        public java.lang.Long delete(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
                              throws java.lang.Exception
        This method will set the buyer purchase order which belongs to the specified term and condition to the state "Closed".
        Parameters:
        abPOTC - a AccessBean object for purchase order limited term and condition.
        Returns:
        the ID of the buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during the process.
      • getInstance

        public static AccountTCHelper getInstance()
        Returns an instance of this class.
        Returns:
        the instance of AccountTCHelper class.
      • getSQLForFindBuzOrgEntityByOrgName

        public java.lang.String getSQLForFindBuzOrgEntityByOrgName(int searchType,
                                                                   java.lang.String searchKeyword)
        Construct part of an SQL query string to retrieve all business organization entities that match to the search criteria.
        Parameters:
        searchType - specify a search criteria option, the valid options are:
        0 - No criteria, it will search all accounts in system
        1 - Match case, beginning with
        2 - Match case, containing
        3 - Ignore case, beginning with
        4 - Ignore case, containing
        5 - Exact match
        searchKeyword - specify a search keyword for organization name
        Returns:
        a SQL query string
      • isSearchStringFound

        public boolean isSearchStringFound(int searchType,
                                           java.lang.String searchFor,
                                           java.lang.String searchIn)
        Is a search string contained in a give string.
        Parameters:
        searchType - specify a search criteria option, the valid options are:
        0 - No criteria, it will search all accounts in system
        1 - Match case, beginning with
        2 - Match case, containing
        3 - Ignore case, beginning with
        4 - Ignore case, containing
        5 - Exact match
        searchFor - specify a search keyword for organization name
        searchIn - specify the string to search in
        Returns:
        true if the search string is in the give string
      • update

        public java.lang.Long update(com.ibm.commerce.contract.objects.PaymentTCAccessBean abPaymentTC)
                              throws java.lang.Exception
        This method will update the credit line which belongs to this specified payment term and condition.
        Parameters:
        abPaymentTC - a AccessBean object for payment term and condition.
        Returns:
        the ID of the credit line object
        Throws:
        java.lang.Exception - if an error occurred.
      • update

        public java.lang.Long update(com.ibm.commerce.contract.objects.POTCBlanketAccessBean abPOTC)
                              throws java.lang.Exception
        This method will update the buyer purchase order which belongs to the specified term and condition.
        Parameters:
        abPOTC - a AccessBean object for purchase order blanket term and condition.
        Returns:
        the ID of the buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during the process.
      • update

        public java.lang.Long update(com.ibm.commerce.contract.objects.POTCLimitedAccessBean abPOTC)
                              throws java.lang.Exception
        This method will update the buyer purchase order which belongs to the specified term and condition.
        Parameters:
        abPOTC - a AccessBean object for purchase order limited term and condition.
        Returns:
        the ID of the buyer purchase order
        Throws:
        java.lang.Exception - Raised with message _ERR_ACCOUNT_PO_TC_GENERIC_ERROR if an error occurred during the process.