com.ibm.commerce.tools.contract.beans

Class ContractListDataBean

  • java.lang.Object
    • com.ibm.commerce.beans.InputDataBeanImpl
      • com.ibm.commerce.beans.SmartDataBeanImpl
        • com.ibm.commerce.tools.util.CommonSearchHelperBean
          • com.ibm.commerce.tools.contract.beans.ContractListDataBean
  • 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 ContractListDataBean
    extends com.ibm.commerce.tools.util.CommonSearchHelperBean
    implements com.ibm.commerce.security.Protectable, com.ibm.commerce.security.Delegator
    This data bean is used to get a list of ContractDataBean. For example, if there are 3 contracts in a store, the data bean will get a list of all these 3 contracts. When finding Contracts in a store, the data bean will be called. Store identifier and language identifier are prerequisite parameters that need to be set before populate.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ORDER_BY_DESCRIPTION
      orderby parameter values
      static java.lang.String ORDER_BY_END_DATE
      orderby parameter values
      static java.lang.String ORDER_BY_NAME
      orderby parameter values
      static java.lang.String ORDER_BY_START_DATE
      orderby parameter values
      static java.lang.String ORDER_BY_STATE
      orderby parameter values
      static java.lang.String ORDER_BY_STORE_NAME
      orderby parameter values
      static java.lang.String ORDER_BY_STORE_STATE
      orderby parameter values
      static java.lang.String ORDER_BY_VERSION
      orderby parameter values
      static java.lang.String TYPE_EXACT
      TYPE_EXACT pattern match constant
      static java.lang.String TYPE_LIKE
      TYPE_LIKE pattern match constant
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      ContractListDataBean()
      Constructs an ContractListDataBean
      ContractListDataBean(java.lang.Long newAccount, java.lang.String newOrder, java.lang.String newState)
      Constructs a ContractListDataBean from an existing account identifier Find the Contracts in an account
      ContractListDataBean(java.lang.Long newAccount, java.lang.String newLanguage, java.lang.String newOrder, java.lang.String newState, java.lang.String newStoreID, int newUsage)
      Constructs a ContractListDataBean from an existing account identifier Find the Contracts in an account
      ContractListDataBean(java.lang.String newOrder, java.lang.String newState)
      Constructs an ContractListDataBean for Distributors and Hosted Stores Find all of the Distributor Contracts
      ContractListDataBean(java.lang.String newLanguage, java.lang.String newOrder, java.lang.String newState, java.lang.String newStoreID, int newUsage)
      Constructs an ContractListDataBean for Distributors and Hosted Stores Find all of the Distributor Contracts
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String buildQuery()
      Constructs the database query
      void buildResultDataBean(java.util.Vector resultVector)
      Constructs the list of data beans
      java.lang.Long getAccountId()
      Gets the accountId
      boolean getAllAccounts()
      Gets the all accounts parameter.
      ContractDataBean[] getContractList()
      Gets the list of entries that were found
      ContractDataBean getContractListData(int index)
      Gets a specific entry that was found
      java.lang.String getDefaultLanguageID()
      Returns the default language ID.
      com.ibm.commerce.security.Protectable getDelegate()
      Returns the access control delegate of this data bean.
      java.lang.String getLanguageID()
      Returns the language ID.
      int getNumberOfContracts()
      Gets the number of contracts returned.
      java.lang.String getOrderByParameter()
      Gets the orderBy parameter.
      java.lang.Long getOwner()
      Gets the owner of the contract.
      java.lang.String getSearchDesc()
      Gets the search description parameter.
      java.lang.String getSearchDescFilter()
      Gets the search description filter parameter
      java.lang.String getSearchName()
      Gets the search name parameter.
      java.lang.String getSearchNameFilter()
      Gets the search name filter parameter.
      java.lang.String getSearchStoreName()
      Gets the search store name parameter.
      java.lang.String getSearchStoreNameFilter()
      Gets the search store name filter parameter.
      java.lang.String getStateParameter()
      Gets the state parameter.
      java.lang.String getStoreID()
      Returns the store ID.
      java.lang.String getType()
      Gets the type of contracts to list.
      int getUsage()
      Gets the usage of the contracts to list.
      void setAccountId(java.lang.Long newAccountId)
      Sets the account ID.
      void setAllAccounts(boolean allAccounts)
      Sets whether or not contracts are to be listed from all of the accounts.
      void setContractList(java.util.Vector newContractList)
      Set the list of results found
      void setDefaultLanguageID(java.lang.String defaultLanguageID)
      Sets the default language ID.
      void setLanguageID(java.lang.String languageID)
      Sets the language ID.
      void setNumberOfContracts(int numberOfContracts)
      Sets the number of contracts returned.
      void setOrderByParameter(java.lang.String orderByParameter)
      Sets the orderBy parameter.
      void setSearchDesc(java.lang.String searchDesc)
      Sets the search description parameter.
      void setSearchDescFilter(java.lang.String searchDescFilter)
      Sets the search description filter parameter
      void setSearchName(java.lang.String searchName)
      Sets the search name parameter.
      void setSearchNameFilter(java.lang.String searchNameFilter)
      Sets the search name filter parameter
      void setSearchStoreName(java.lang.String searchStoreName)
      Sets the search store name parameter.
      void setSearchStoreNameFilter(java.lang.String searchStoreNameFilter)
      Sets the search store name filter parameter.
      void setStateParameter(java.lang.String stateParameter)
      Sets the state parameter.
      void setStoreID(java.lang.String storeID)
      Sets the store ID.
      void setType(java.lang.String type)
      Sets the type of contracts to list.
      void setUsage(int usage)
      Sets the usage of the contracts to list.
      • Methods inherited from class com.ibm.commerce.tools.util.CommonSearchHelperBean

        escapeSQLstring, getDefaultLanguageId, getIndexBegin, getIndexEnd, getLanguageId, getListSize, getResultList, getResultSetSize, getStoreId, getStoreIds, getStoreIdsInEntityType, getStoreRelType, getUpperCaseFunction, getUseCursor, populate, setIndexBegin, setIndexEnd, setLanguageId, setResultList, setResultSetSize, setStoreId, setStoreIds, setStoreIdsInEntityType, setStoreRelType, setUseCursor
      • Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl

        fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
      • Methods inherited from class com.ibm.commerce.beans.InputDataBeanImpl

        getRequestProperties, setRequestProperties
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills
      • Methods inherited from interface com.ibm.commerce.beans.InputDataBean

        getRequestProperties, setRequestProperties
    • Field Detail

      • ORDER_BY_DESCRIPTION

        public static final java.lang.String ORDER_BY_DESCRIPTION
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_END_DATE

        public static final java.lang.String ORDER_BY_END_DATE
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_NAME

        public static final java.lang.String ORDER_BY_NAME
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_START_DATE

        public static final java.lang.String ORDER_BY_START_DATE
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_STATE

        public static final java.lang.String ORDER_BY_STATE
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_STORE_NAME

        public static final java.lang.String ORDER_BY_STORE_NAME
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_STORE_STATE

        public static final java.lang.String ORDER_BY_STORE_STATE
        orderby parameter values
        See Also:
        Constant Field Values
      • ORDER_BY_VERSION

        public static final java.lang.String ORDER_BY_VERSION
        orderby parameter values
        See Also:
        Constant Field Values
      • TYPE_EXACT

        public static final java.lang.String TYPE_EXACT
        TYPE_EXACT pattern match constant
        See Also:
        Constant Field Values
      • TYPE_LIKE

        public static final java.lang.String TYPE_LIKE
        TYPE_LIKE pattern match constant
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContractListDataBean

        public ContractListDataBean()
        Constructs an ContractListDataBean
      • ContractListDataBean

        public ContractListDataBean(java.lang.Long newAccount,
                                    java.lang.String newOrder,
                                    java.lang.String newState)
        Constructs a ContractListDataBean from an existing account identifier Find the Contracts in an account
        Parameters:
        newAccount - an existing account identifier
        newOrder - the column parameter in which to order the data
        newState - the contracts to find should have this state
      • ContractListDataBean

        public ContractListDataBean(java.lang.Long newAccount,
                                    java.lang.String newLanguage,
                                    java.lang.String newOrder,
                                    java.lang.String newState,
                                    java.lang.String newStoreID,
                                    int newUsage)
        Constructs a ContractListDataBean from an existing account identifier Find the Contracts in an account
        Parameters:
        newAccount - an existing account identifier
        newLanguage - the language for descriptions to be shown and search to take place in
        newOrder - the column parameter in which to order the data
        newState - the contracts to find should have this state
        newStoreID - the identifier of the store to which the contracts belong
        newUsage - the type of contracts to be listed
      • ContractListDataBean

        public ContractListDataBean(java.lang.String newOrder,
                                    java.lang.String newState)
        Constructs an ContractListDataBean for Distributors and Hosted Stores Find all of the Distributor Contracts
        Parameters:
        newOrder - the column parameter in which to order the data
        newState - the contracts to find should have this state
      • ContractListDataBean

        public ContractListDataBean(java.lang.String newLanguage,
                                    java.lang.String newOrder,
                                    java.lang.String newState,
                                    java.lang.String newStoreID,
                                    int newUsage)
        Constructs an ContractListDataBean for Distributors and Hosted Stores Find all of the Distributor Contracts
        Parameters:
        newLanguage - the language for descriptions to be shown and search to take place in
        newOrder - the column parameter in which to order the data
        newState - the contracts to find should have this state
        newStoreID - the identifier of the store to which the contracts belong
        newUsage - the type of contracts to be listed
    • Method Detail

      • buildQuery

        public java.lang.String buildQuery()
                                    throws java.lang.Exception
        Constructs the database query
        Specified by:
        buildQuery in class com.ibm.commerce.tools.util.CommonSearchHelperBean
        Returns:
        the SQL query string.
        Throws:
        java.lang.Exception
      • buildResultDataBean

        public void buildResultDataBean(java.util.Vector resultVector)
        Constructs the list of data beans
        Specified by:
        buildResultDataBean in class com.ibm.commerce.tools.util.CommonSearchHelperBean
        Parameters:
        resultVector - the result vector returned from the query execution
      • getAccountId

        public java.lang.Long getAccountId()
        Gets the accountId
        Returns:
        the account id
      • getAllAccounts

        public boolean getAllAccounts()
        Gets the all accounts parameter.
        Returns:
        true if the contracts for all of the accounts are desired
      • getContractList

        public ContractDataBean[] getContractList()
        Gets the list of entries that were found
        Returns:
        the list of entries that were found
      • getContractListData

        public ContractDataBean getContractListData(int index)
                                             throws java.lang.ArrayIndexOutOfBoundsException
        Gets a specific entry that was found
        Parameters:
        index - the index of the result array
        Returns:
        the specific entry that was found
        Throws:
        java.lang.ArrayIndexOutOfBoundsException
      • getDefaultLanguageID

        public java.lang.String getDefaultLanguageID()
        Returns the default language ID.
        Returns:
        java.lang.String
      • 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 delegate
        Throws:
        java.lang.Exception
      • getLanguageID

        public java.lang.String getLanguageID()
        Returns the language ID.
        Returns:
        java.lang.String
      • getNumberOfContracts

        public int getNumberOfContracts()
        Gets the number of contracts returned.
        Returns:
        the number of contracts
      • getOrderByParameter

        public java.lang.String getOrderByParameter()
        Gets the orderBy parameter.
        Returns:
        the order by parameter
      • getOwner

        public java.lang.Long getOwner()
                                throws java.lang.Exception
        Gets the owner of the contract. This returns the member reference number of the owner of the account if a business relationship management contract. Otherwise this gets the owner of the store.
        Specified by:
        getOwner in interface com.ibm.commerce.security.Protectable
        Returns:
        the id of the owner of the account
        Throws:
        raised - when there is a remote exception
        raised - when there is any exception
        java.lang.Exception
      • getSearchDesc

        public java.lang.String getSearchDesc()
        Gets the search description parameter.
        Returns:
        the search description
      • getSearchDescFilter

        public java.lang.String getSearchDescFilter()
        Gets the search description filter parameter
        Returns:
        the search description filter
      • getSearchName

        public java.lang.String getSearchName()
        Gets the search name parameter.
        Returns:
        the search name
      • getSearchNameFilter

        public java.lang.String getSearchNameFilter()
        Gets the search name filter parameter.
        Returns:
        the search name filter
      • getSearchStoreName

        public java.lang.String getSearchStoreName()
        Gets the search store name parameter.
        Returns:
        the search store name
      • getSearchStoreNameFilter

        public java.lang.String getSearchStoreNameFilter()
        Gets the search store name filter parameter.
        Returns:
        the search store name filter
      • getStateParameter

        public java.lang.String getStateParameter()
        Gets the state parameter.
        Returns:
        the state parameter
      • getStoreID

        public java.lang.String getStoreID()
        Returns the store ID.
        Returns:
        java.lang.String
      • getType

        public java.lang.String getType()
        Gets the type of contracts to list.
        Returns:
        the type
      • getUsage

        public int getUsage()
        Gets the usage of the contracts to list.
        Returns:
        the contract usage; for example referral, reseller
      • setAccountId

        public void setAccountId(java.lang.Long newAccountId)
        Sets the account ID.
        Parameters:
        newAccountId - the accountId to set
      • setAllAccounts

        public void setAllAccounts(boolean allAccounts)
        Sets whether or not contracts are to be listed from all of the accounts.
        Parameters:
        allAccounts - contracts are to be listed from all the accounts when set to true
      • setContractList

        public void setContractList(java.util.Vector newContractList)
        Set the list of results found
        Parameters:
        newContractList - the result list
      • setDefaultLanguageID

        public void setDefaultLanguageID(java.lang.String defaultLanguageID)
        Sets the default language ID.
        Parameters:
        defaultLanguageID - The defaultLanguageID to set
      • setLanguageID

        public void setLanguageID(java.lang.String languageID)
        Sets the language ID.
        Parameters:
        languageID - The languageID to set
      • setNumberOfContracts

        public void setNumberOfContracts(int numberOfContracts)
        Sets the number of contracts returned.
        Parameters:
        numberOfContracts - the number of contracts to set
      • setOrderByParameter

        public void setOrderByParameter(java.lang.String orderByParameter)
        Sets the orderBy parameter.
        Parameters:
        orderByParameter - the orderByParameter to set
      • setSearchDesc

        public void setSearchDesc(java.lang.String searchDesc)
        Sets the search description parameter.
        Parameters:
        searchDesc - the short description search parameter to set
      • setSearchDescFilter

        public void setSearchDescFilter(java.lang.String searchDescFilter)
        Sets the search description filter parameter
        Parameters:
        searchDescFilter - sets the short description search filter
      • setSearchName

        public void setSearchName(java.lang.String searchName)
        Sets the search name parameter.
        Parameters:
        searchName - The searchName to set
      • setSearchNameFilter

        public void setSearchNameFilter(java.lang.String searchNameFilter)
        Sets the search name filter parameter
        Parameters:
        searchNameFilter - sets the name search filter
      • setSearchStoreName

        public void setSearchStoreName(java.lang.String searchStoreName)
        Sets the search store name parameter.
        Parameters:
        searchStoreName - the searchStoreName to set
      • setSearchStoreNameFilter

        public void setSearchStoreNameFilter(java.lang.String searchStoreNameFilter)
        Sets the search store name filter parameter.
        Parameters:
        searchStoreNameFilter - sets the store name search filter
      • setStateParameter

        public void setStateParameter(java.lang.String stateParameter)
        Sets the state parameter.
        Parameters:
        stateParameter - the stateParameter to set
      • setStoreID

        public void setStoreID(java.lang.String storeID)
        Sets the store ID.
        Parameters:
        storeID - The storeID to set
      • setType

        public void setType(java.lang.String type)
        Sets the type of contracts to list.
        Parameters:
        type - the type to set
      • setUsage

        public void setUsage(int usage)
        Sets the usage of the contracts to list.
        Parameters:
        usage - The usage to set