com.ibm.commerce.tools.contract.beans

Class ContractDataBean

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


    public class ContractDataBean
    extends java.lang.Object
    implements com.ibm.commerce.beans.SmartDataBean, com.ibm.commerce.security.Protectable, com.ibm.commerce.security.Delegator
    This data bean represents a Contract object. Contracts enable a customer organization to purchase products from a store at a specified price for a specified period of time. It also enables a customer organization to purchase products from a group of stores. When retrieving all the data associated with a Contract, the data bean will be called. Sets the Contract and language identifiers in order to populate the bean. The data bean maps to a database table CONTRACT
    See Also:
    Serialized Form
    • Field Summary

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

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      ContractDataBean()
      Creates a ContractDataBean
      ContractDataBean(java.lang.Long newContractId, java.lang.Integer newLangId)
      Constructs a ContractDataBean from an existing Contract identifier
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean fulfills(java.lang.Long member, java.lang.String relationship)
      Determines if a given member fulfills a given relationship with the resource.
      java.lang.Long getAccountId()
      Gets the account identifier of the account this contract belongs to If can't get the id, it will return null.
      java.util.Vector getBaseContractIds()
      Gets the base contract IDs of this contract
      java.util.Vector getBuyerName()
      Gets the customer names assigned to the contract
      java.lang.String getBuyerName(int index)
      Gets a customer name assigned to the contract
      java.lang.String getBuyerNumber(int index)
      Gets a customer identifier assigned to the contract
      com.ibm.commerce.command.CommandContext getCommandContext()
      Returns the current command's context
      java.lang.String getContractAccount()
      Gets the name of the account of the contract that this contract refers to
      java.util.Vector getContractAttachments()
      Gets the list of attachments on the contract
      java.lang.String getContractComment()
      Gets the comments in the contract
      java.lang.String getContractDescription()
      Gets the description of the contract
      java.lang.String getContractId()
      Gets the identifier of the contract
      java.lang.String getContractName()
      Gets the name of the contract
      java.lang.String getContractOrigin()
      Gets the origin of the contract
      java.lang.String getContractOriginValue()
      Gets the origin of the contract as the numeric value.
      java.lang.String getContractState()
      Gets the state of the contract
      java.lang.String getContractStore()
      Gets the name of the store of the contract that this contract refers to
      java.lang.String getContractStoreId()
      Gets the contract store id
      java.lang.String getContractStoreName()
      Gets the contractStoreName
      java.lang.String getContractStoreStatus()
      Gets the contract store status
      java.lang.String getContractStoreURL()
      Gets the contract store URL
      java.lang.String getContractTitle()
      Gets the title of the contract
      java.lang.String getContractUsage()
      Gets the usage type of the contract
      java.sql.Timestamp getCreateDate()
      Gets the creation date of the contract
      boolean getCreditLineAllowed()
      Gets where the contract can use the credit line defined in the account
      java.lang.String getCustomerName()
      Gets the customer name, used when account is also listed
      com.ibm.commerce.security.Protectable getDelegate()
      Returns the access control delegate of this data bean
      java.sql.Timestamp getEndDate()
      Gets the end date of the contract
      java.lang.Long getEntityId()
      Gets the entity identifier for UBF
      java.lang.String getFamilyId()
      Gets the family identifier of the contract
      java.lang.String getMajorVersionNumber()
      Gets the major version number of the contract
      java.lang.String getMemberGroupId(int index)
      Gets the owner of a member group assigned to the contract.
      java.util.Vector getMemberGroupName()
      Gets the member groups assigned to the contract.
      java.lang.String getMemberGroupName(int index)
      Gets a member group assigned to the contract.
      java.util.Vector getMemberGroupName(java.lang.String role)
      Gets the member groups assigned to the contract with the assigned role.
      java.lang.Long getMemberId()
      Gets the member identifier of the owner of the contract
      java.lang.String getMinorVersionNumber()
      Gets the minor version number of the contract
      java.lang.Long getOwner()
      Gets the owner of the contract
      java.lang.String getPriceListType()
      Gets the price list type associated with this contract, or any base contract, catalog filter term and condition
      java.lang.String getPriceListType(boolean thisContractOnly)
      Gets the price list type associated with this contract, or any base contract, catalog filter term and condition
      java.lang.String getReferenceContractAccount()
      Gets the name of the account of the contract that this contract refers to
      java.lang.String getReferenceContractId()
      Gets the id of the contract this contract refers to
      java.lang.String getReferenceContractName()
      Gets the name of the contract this contract refers to
      java.lang.String getReferenceContractStore()
      Gets the name of the store of the contract that this contract refers to
      java.lang.String getReferenceFamilyId()
      Gets the referred contract family id that this contract refers to.
      com.ibm.commerce.datatype.TypedProperty getRequestProperties()
      Gets the request properties
      java.sql.Timestamp getStartDate()
      Gets the start date of the contract
      java.lang.Integer getStateIdentifier()
      Gets the state identifier for UBF
      java.lang.String[] getStoreentIndentifiersFromContract()
      Gets the storeent identifiers (Hosted Reseller Store Name) with given contract Id
      java.lang.String getUpdateDate()
      Gets the update date of the contract
      boolean isDeployedToStore(java.lang.Integer storeId)
      Checks if a Contract is deployed to a store
      void populate()
      This method is used to retrieve the data for the contract.
      void save()
      Method for UBF
      void setBuyerName(java.lang.String newBuyerName, int index)
      Sets a customer name assigned to the contract
      void setCommandContext(com.ibm.commerce.command.CommandContext newICommandContext)
      Sets the command context
      void setContractId(java.lang.String contractId)
      Sets the contract id
      void setContractName(java.lang.String newContractName)
      Sets the contract's name
      void setContractState(java.lang.String state)
      Sets the state
      void setContractStoreId(java.lang.String contractStoreId)
      Sets the contract store id
      void setContractStoreName(java.lang.String contractStoreName)
      Sets the contract store name
      void setContractStoreStatus(java.lang.String contractStoreStatus)
      Sets the contract store status
      void setContractTitle(java.lang.String contractDescription)
      Sets the description
      void setCreateDate(java.sql.Timestamp newCreateDate)
      Sets the create date
      void setCustomerName(java.lang.String customerName)
      Sets the customer name, used when account is also listed
      void setEndDate(java.sql.Timestamp newEndDate)
      Sets the end date
      void setEntityId(java.lang.Long aId)
      Sets the entity identifier for UBF
      void setFamilyId(java.lang.String familyId)
      Sets the family id
      void setMajorVersionNumber(java.lang.String number)
      Sets the major version number
      void setMinorVersionNumber(java.lang.String number)
      Sets the minor version number
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
      Sets the request properties.
      void setStartDate(java.sql.Timestamp startDate)
      Sets the start date
      void setStateIdentifier(java.lang.Integer aStateIdentifier)
      Sets the state identifier for UBF
      • Methods inherited from class java.lang.Object

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

      • ContractDataBean

        public ContractDataBean()
        Creates a ContractDataBean
      • ContractDataBean

        public ContractDataBean(java.lang.Long newContractId,
                                java.lang.Integer newLangId)
        Constructs a ContractDataBean from an existing Contract identifier
        Parameters:
        newContractId - an existing Contract identifier
        newLangId - the language identifier for which language to retrieve the data
    • Method Detail

      • fulfills

        public boolean fulfills(java.lang.Long member,
                                java.lang.String relationship)
                         throws java.lang.Exception
        Determines if a given member fulfills a given relationship with the resource.
        Specified by:
        fulfills in interface com.ibm.commerce.security.Protectable
        Parameters:
        member - the member id of the contract
        relationship - the relationship the member has with respect to the resource
        Returns:
        true if the member fulfills the relationship with the resource
        Throws:
        raises - a remote exception
        raises - an exception
        java.lang.Exception
      • getAccountId

        public java.lang.Long getAccountId()
        Gets the account identifier of the account this contract belongs to If can't get the id, it will return null.
        Returns:
        the account id
      • getBaseContractIds

        public java.util.Vector getBaseContractIds()
        Gets the base contract IDs of this contract
        Returns:
        Vector a vector of Contract IDs
      • getBuyerName

        public java.util.Vector getBuyerName()
        Gets the customer names assigned to the contract
        Returns:
        an array of the customer names
      • getBuyerName

        public java.lang.String getBuyerName(int index)
        Gets a customer name assigned to the contract
        Returns:
        the customer name assigned to the contract
      • getBuyerNumber

        public java.lang.String getBuyerNumber(int index)
        Gets a customer identifier assigned to the contract
        Returns:
        the customer identifier
      • 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:
        the command context
      • getContractAccount

        public java.lang.String getContractAccount()
        Gets the name of the account of the contract that this contract refers to
        Returns:
        the name of the account of the contract that this contract refers to
      • getContractAttachments

        public java.util.Vector getContractAttachments()
        Gets the list of attachments on the contract
        Returns:
        the list of attachments
      • getContractComment

        public java.lang.String getContractComment()
        Gets the comments in the contract
        Returns:
        the contract comments
      • getContractDescription

        public java.lang.String getContractDescription()
        Gets the description of the contract
        Returns:
        the description of the contract
      • getContractId

        public java.lang.String getContractId()
        Gets the identifier of the contract
        Returns:
        the identifier of the contract
      • getContractName

        public java.lang.String getContractName()
        Gets the name of the contract
        Returns:
        the name of the contract
      • getContractOrigin

        public java.lang.String getContractOrigin()
        Gets the origin of the contract
        Returns:
        the origin of the contract
      • getContractOriginValue

        public java.lang.String getContractOriginValue()
        Gets the origin of the contract as the numeric value.
        Returns:
        the origin of the contract.
      • getContractState

        public java.lang.String getContractState()
        Gets the state of the contract
        Returns:
        the state of the contract
      • getContractStore

        public java.lang.String getContractStore()
        Gets the name of the store of the contract that this contract refers to
        Returns:
        the name of the store of the contract that this contract refers to
      • getContractStoreId

        public java.lang.String getContractStoreId()
        Gets the contract store id
        Returns:
        the contract store id
      • getContractStoreName

        public java.lang.String getContractStoreName()
        Gets the contractStoreName
        Returns:
        the contract store name
      • getContractStoreStatus

        public java.lang.String getContractStoreStatus()
        Gets the contract store status
        Returns:
        the store status
      • getContractStoreURL

        public java.lang.String getContractStoreURL()
        Gets the contract store URL
        Returns:
        the contract store URL
      • getContractTitle

        public java.lang.String getContractTitle()
        Gets the title of the contract
        Returns:
        the title of the contract
      • getContractUsage

        public java.lang.String getContractUsage()
        Gets the usage type of the contract
        Returns:
        the usage type of the contract
      • getCreateDate

        public java.sql.Timestamp getCreateDate()
        Gets the creation date of the contract
        Returns:
        the creation date of the contract
      • getCreditLineAllowed

        public boolean getCreditLineAllowed()
        Gets where the contract can use the credit line defined in the account
        Returns:
        true if the contract can use the credit line defined in the account
      • getCustomerName

        public java.lang.String getCustomerName()
        Gets the customer name, used when account is also listed
        Returns:
        the customer name
      • 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:
        the access control delegate of this data bean
        Throws:
        java.lang.Exception
      • getEndDate

        public java.sql.Timestamp getEndDate()
        Gets the end date of the contract
        Returns:
        the end date of the contract
      • getEntityId

        public java.lang.Long getEntityId()
        Gets the entity identifier for UBF
        Returns:
        the entity identifier for UBF
      • getFamilyId

        public java.lang.String getFamilyId()
        Gets the family identifier of the contract
        Returns:
        the family identifier of the contract
      • getMajorVersionNumber

        public java.lang.String getMajorVersionNumber()
        Gets the major version number of the contract
        Returns:
        the major version number of the contract
      • getMemberGroupId

        public java.lang.String getMemberGroupId(int index)
        Gets the owner of a member group assigned to the contract.
        Returns:
        the member group owner
      • getMemberGroupName

        public java.util.Vector getMemberGroupName()
        Gets the member groups assigned to the contract.
        Returns:
        an array of the member group names
      • getMemberGroupName

        public java.lang.String getMemberGroupName(int index)
        Gets a member group assigned to the contract.
        Returns:
        the member group name assigned to the contract
      • getMemberGroupName

        public java.util.Vector getMemberGroupName(java.lang.String role)
        Gets the member groups assigned to the contract with the assigned role.
        Returns:
        an array of the member group names
      • getMemberId

        public java.lang.Long getMemberId()
        Gets the member identifier of the owner of the contract
        Returns:
        the member identifier of the owner of the contract
      • getMinorVersionNumber

        public java.lang.String getMinorVersionNumber()
        Gets the minor version number of the contract
        Returns:
        the minor version number of the contract
      • getOwner

        public java.lang.Long getOwner()
                                throws java.lang.Exception
        Gets the owner of the contract
        Specified by:
        getOwner in interface com.ibm.commerce.security.Protectable
        Returns:
        the id of the owner of the contract
        Throws:
        throws - a remote exception
        java.lang.Exception
      • getPriceListType

        public java.lang.String getPriceListType()
        Gets the price list type associated with this contract, or any base contract, catalog filter term and condition
        Returns:
        the price list type that is associated with the current contract
      • getPriceListType

        public java.lang.String getPriceListType(boolean thisContractOnly)
        Gets the price list type associated with this contract, or any base contract, catalog filter term and condition
        Parameters:
        thisContractOnly - only check the term and condition in this contract
        Returns:
        the price list type that is associated with the current contract
      • getReferenceContractAccount

        public java.lang.String getReferenceContractAccount()
        Gets the name of the account of the contract that this contract refers to
        Returns:
        the name of the account of the contract that this contract refers to
      • getReferenceContractId

        public java.lang.String getReferenceContractId()
        Gets the id of the contract this contract refers to
        Returns:
        the id of the contract to which this contract refers
      • getReferenceContractName

        public java.lang.String getReferenceContractName()
        Gets the name of the contract this contract refers to
        Returns:
        the name of the contract this contract refers to
      • getReferenceContractStore

        public java.lang.String getReferenceContractStore()
        Gets the name of the store of the contract that this contract refers to
        Returns:
        the name of the store of the contract that this contract refers to
      • getReferenceFamilyId

        public java.lang.String getReferenceFamilyId()
        Gets the referred contract family id that this contract refers to.
        Returns:
        the referred contract family id that this contract refers to
      • getRequestProperties

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

        public java.sql.Timestamp getStartDate()
        Gets the start date of the contract
        Returns:
        the start date of the contract
      • getStateIdentifier

        public java.lang.Integer getStateIdentifier()
        Gets the state identifier for UBF
        Returns:
        the state identifier for UBF
      • getStoreentIndentifiersFromContract

        public java.lang.String[] getStoreentIndentifiersFromContract()
        Gets the storeent identifiers (Hosted Reseller Store Name) with given contract Id
        Returns:
        the storeent identifier(s) that is associated with the current contract
      • getUpdateDate

        public java.lang.String getUpdateDate()
        Gets the update date of the contract
        Returns:
        the update date of the contract
      • isDeployedToStore

        public boolean isDeployedToStore(java.lang.Integer storeId)
        Checks if a Contract is deployed to a store
        Parameters:
        storeId - the store ID
        Returns:
        true if the contract is deployed to the store, false otherwise
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to retrieve the data for the contract. This method does nothing because we do not want to load all of the data at one time. Each method loads the necessary data. 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
      • save

        public void save()
        Method for UBF
      • setBuyerName

        public void setBuyerName(java.lang.String newBuyerName,
                                 int index)
        Sets a customer name assigned to the contract
        Parameters:
        newBuyerName - the buyer name to be set
        index - the index of the new buyer's name
      • 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 - sets the command context
      • setContractId

        public void setContractId(java.lang.String contractId)
        Sets the contract id
        Parameters:
        contractId - the contract id to set
      • setContractName

        public void setContractName(java.lang.String newContractName)
        Sets the contract's name
        Parameters:
        newContractName - the contract name
      • setContractState

        public void setContractState(java.lang.String state)
        Sets the state
        Parameters:
        state - the state to set
      • setContractStoreId

        public void setContractStoreId(java.lang.String contractStoreId)
        Sets the contract store id
        Parameters:
        contractStoreId - sets the contract store's id
      • setContractStoreName

        public void setContractStoreName(java.lang.String contractStoreName)
        Sets the contract store name
        Parameters:
        contractStoreName - the contract store name
      • setContractStoreStatus

        public void setContractStoreStatus(java.lang.String contractStoreStatus)
        Sets the contract store status
        Parameters:
        contractStoreStatus - sets the contract store status
      • setContractTitle

        public void setContractTitle(java.lang.String contractDescription)
        Sets the description
        Parameters:
        contractDescription - the contract description to set
      • setCreateDate

        public void setCreateDate(java.sql.Timestamp newCreateDate)
        Sets the create date
        Parameters:
        newCreateDate - the create date to set
      • setCustomerName

        public void setCustomerName(java.lang.String customerName)
        Sets the customer name, used when account is also listed
        Parameters:
        customerName - the customer name to set
      • setEndDate

        public void setEndDate(java.sql.Timestamp newEndDate)
        Sets the end date
        Parameters:
        newEndDate - the endDate to set
      • setEntityId

        public void setEntityId(java.lang.Long aId)
        Sets the entity identifier for UBF
        Parameters:
        aId - the entity id to be set
      • setFamilyId

        public void setFamilyId(java.lang.String familyId)
        Sets the family id
        Parameters:
        familyId - the family id to set
      • setMajorVersionNumber

        public void setMajorVersionNumber(java.lang.String number)
        Sets the major version number
        Parameters:
        number - the major version number to set
      • setMinorVersionNumber

        public void setMinorVersionNumber(java.lang.String number)
        Sets the minor version number
        Parameters:
        number - the minor version number to set
      • 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 - sets the request properties
      • setStartDate

        public void setStartDate(java.sql.Timestamp startDate)
        Sets the start date
        Parameters:
        startDate - the startDate to set
      • setStateIdentifier

        public void setStateIdentifier(java.lang.Integer aStateIdentifier)
        Sets the state identifier for UBF
        Parameters:
        aStateIdentifier - sets the state identifier