com.ibm.commerce.tools.contract.beans
Class ContractListDataBean

java.lang.Object
  |
  +--com.ibm.commerce.tools.util.CommonSearchHelperBean
        |
        +--com.ibm.commerce.tools.contract.beans.ContractListDataBean

public class ContractListDataBean
extends com.ibm.commerce.tools.util.CommonSearchHelperBean

Find Contracts in a store

See Also:
Serialized Form

Field Summary
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_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
 
Constructor Summary
ContractListDataBean()
          Construct an ContractListDataBean
ContractListDataBean(java.lang.Long newAccount, java.lang.String newOrder, java.lang.String newState)
          Construct 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)
          Construct a ContractListDataBean from an existing account identifier Find the Contracts in an account
ContractListDataBean(java.lang.String newOrder, java.lang.String newState)
          Construct 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)
          Construct an ContractListDataBean for Distributors and Hosted Stores Find all of the Distributor Contracts
 
Method Summary
 java.lang.String buildQuery()
          Construct the database query
 void buildResultDataBean(java.util.Vector resultVector)
          Construct the list of data beans
 java.lang.Long getAccountId()
          Gets the accountId
 boolean getAllAccounts()
          Gets the all accounts parameter.
  ContractDataBean[] getContractList()
          Get the list of entries that were found
  ContractDataBean getContractListData(int index)
          Get 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORDER_BY_NAME

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

ORDER_BY_DESCRIPTION

public static final java.lang.String ORDER_BY_DESCRIPTION
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_END_DATE

public static final java.lang.String ORDER_BY_END_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_VERSION

public static final java.lang.String ORDER_BY_VERSION
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

TYPE_LIKE

public static final java.lang.String TYPE_LIKE
TYPE_LIKE pattern match constant
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
Constructor Detail

ContractListDataBean

public ContractListDataBean()
Construct an ContractListDataBean

ContractListDataBean

public ContractListDataBean(java.lang.Long newAccount,
                            java.lang.String newOrder,
                            java.lang.String newState)
Construct 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)
Construct 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)
Construct 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)
Construct 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
Construct the database query
Returns:
the SQL query string.
java.lang.Exception

buildResultDataBean

public void buildResultDataBean(java.util.Vector resultVector)
Construct the list of data beans
Parameters:
resultVector - the result vector returned from the query execution

getContractList

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

getDelegate

public com.ibm.commerce.security.Protectable getDelegate()
                                                  throws java.lang.Exception
Returns the access control delegate of this data bean.
Returns:
the delegate
Throws:
java.lang.Exception

getOwner

public java.lang.Long getOwner()
                        throws java.lang.Exception,
                               java.rmi.RemoteException
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.
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
java.rmi.RemoteException

getAccountId

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

getContractListData

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

setContractList

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

setAccountId

public void setAccountId(java.lang.Long newAccountId)
Sets the account ID.

getOrderByParameter

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

setOrderByParameter

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

getStateParameter

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

setStateParameter

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

getNumberOfContracts

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

setNumberOfContracts

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

getType

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

setType

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

getUsage

public int getUsage()
Gets the usage of the contracts to list.
Returns:
the contract usage; e.g. referral, reseller

setUsage

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

getSearchName

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

setSearchName

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

getSearchNameFilter

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

setSearchNameFilter

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

getSearchDesc

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

setSearchDesc

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

getSearchDescFilter

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

setSearchDescFilter

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

getSearchStoreName

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

setSearchStoreName

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

getSearchStoreNameFilter

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

setSearchStoreNameFilter

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

getAllAccounts

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

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

getDefaultLanguageID

public java.lang.String getDefaultLanguageID()
                                      throws java.rmi.RemoteException,
                                             javax.ejb.CreateException,
                                             FinderException,
                                             javax.naming.NamingException
Returns the default language ID.
Returns:
java.lang.String
java.rmi.RemoteException
javax.ejb.CreateException
FinderException
javax.naming.NamingException

getLanguageID

public java.lang.String getLanguageID()
                               throws java.rmi.RemoteException,
                                      CreateException,
                                      FinderException,
                                      javax.naming.NamingException
Returns the language ID.
Returns:
java.lang.String
java.rmi.RemoteException
CreateException
FinderException
javax.naming.NamingException

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

getStoreID

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

setStoreID

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