com.ibm.commerce.tools.contract.beans

Class AddressBookTCDataBean

  • java.lang.Object
    • com.ibm.commerce.tools.contract.beans.AddressBookTCDataBean
  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, com.ibm.commerce.security.Delegator, java.io.Serializable


    public class AddressBookTCDataBean
    extends java.lang.Object
    implements com.ibm.commerce.beans.SmartDataBean, com.ibm.commerce.security.Delegator
    This data bean represents an Address Book Term and Condition object. An address book is a container for addresses owned by a member. When retrieving all the data associated with an Address Book Term and Condition, the data bean will be called. Sets the contract, language identifiers and the type of address book in order to populate the bean. The data bean maps to a database table TERMCOND
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      AddressBookTCDataBean(java.lang.Long newContractId, java.lang.Integer newLangId, java.lang.String type)
      Constructs an AddressBookTCDataBean from an existing contract identifier Find the Address Book terms and conditions in the contract
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.ibm.commerce.command.CommandContext getCommandContext()
      Returns the current command's context
      java.lang.Long getContractId()
      Gets the contract identifier for the contract this term and condition are in
      com.ibm.commerce.security.Protectable getDelegate()
      Returns the access control delegate of this data bean
      boolean getHasTC()
      Determines whether the contract has an address book term and condition.
      java.lang.String getReferenceNumber()
      Gets the reference number of the order approval term and condition in the contract
      com.ibm.commerce.datatype.TypedProperty getRequestProperties()
      Gets the request properties
      boolean getUseAccountAddressBook()
      Returns if the customer can use addresses from their account's organization's address book.
      boolean getUseParentOrgAddressBook()
      Returns if the customer can use addresses from their parent organization's address book.
      boolean getUsePersonalAddressBook()
      Returns whether the customer can use addresses from their personal address book.
      void populate()
      This method is used to retrieve the Address Book data in the contract.
      void setCommandContext(com.ibm.commerce.command.CommandContext newICommandContext)
      Sets the command context
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
      Sets the request properties.
      • Methods inherited from class java.lang.Object

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

      • AddressBookTCDataBean

        public AddressBookTCDataBean(java.lang.Long newContractId,
                                     java.lang.Integer newLangId,
                                     java.lang.String type)
        Constructs an AddressBookTCDataBean from an existing contract identifier Find the Address Book terms and conditions in the contract
        Parameters:
        newContractId - Long An existing contract identifier
        newLangId - Integer The language identifier for which language to retrieve the data
        type - String The type of address book, Valid values are P (primary address book) or S (secondary address book).
    • Method Detail

      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Returns the current command's context
        Specified by:
        getCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Returns:
        com.ibm.commerce.command.CommandContext
      • getContractId

        public java.lang.Long getContractId()
        Gets the contract identifier for the contract this term and condition are in
        Returns:
        Long contractId, the contract identifier
      • getDelegate

        public com.ibm.commerce.security.Protectable getDelegate()
                                                          throws java.lang.Exception
        Returns the access control delegate of this data bean
        Specified by:
        getDelegate in interface com.ibm.commerce.security.Delegator
        Returns:
        com.ibm.commerce.security.Protectable
        Throws:
        java.lang.Exception
      • getHasTC

        public boolean getHasTC()
        Determines whether the contract has an address book term and condition.
        Returns:
        boolean hasTC, true if it has, false otherwise
      • getReferenceNumber

        public java.lang.String getReferenceNumber()
        Gets the reference number of the order approval term and condition in the contract
        Returns:
        java.lang.String if it can't get the number, it will return empty string "".
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets the request properties
        Specified by:
        getRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Returns:
        null
      • getUseAccountAddressBook

        public boolean getUseAccountAddressBook()
        Returns if the customer can use addresses from their account's organization's address book.
        Returns:
        boolean true if the customer can, false otherwise
      • getUseParentOrgAddressBook

        public boolean getUseParentOrgAddressBook()
        Returns if the customer can use addresses from their parent organization's address book.
        Returns:
        boolean true if the customer can, false otherwise.
      • getUsePersonalAddressBook

        public boolean getUsePersonalAddressBook()
        Returns whether the customer can use addresses from their personal address book.
        Returns:
        boolean true if the customer can, false otherwise.
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to retrieve the Address Book data in the contract. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Throws:
        java.lang.Exception
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext newICommandContext)
        Sets the command context
        Specified by:
        setCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Parameters:
        newICommandContext - com.ibm.commerce.command.CommandContext
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
        Sets the request properties.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Parameters:
        param - com.ibm.commerce.datatype.TypedProperty