public class AccountListDataBean
extends com.ibm.commerce.tools.util.CommonSearchHelperBean
implements com.ibm.commerce.security.Protectable, com.ibm.commerce.security.Delegator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ORDER_BY_CUSTOMER
The order by constants used in the dynamic list representation of this bean
|
static java.lang.String |
ORDER_BY_REPRESENTATIVE
The order by constants used in the dynamic list representation of this bean
|
static int |
SEARCHTYPE_ACCOUNT_COUNT
Total Accounts Count search type constant
|
static int |
SEARCHTYPE_EXACT_MATCH
Exact Match with keyword search type constant
|
static int |
SEARCHTYPE_IGNORE_CASE_BEGIN
Ignore case beginning with keyword search type constant
|
static int |
SEARCHTYPE_IGNORE_CASE_CONTAIN
Ignore case containing with keyword search type constant
|
static int |
SEARCHTYPE_MATCH_CASE_BEGIN
Match case beginning with keyword search type constant
|
static int |
SEARCHTYPE_MATCH_CASE_CONTAIN
Match case containing with keyword search type constant
|
static int |
SEARCHTYPE_SEARCH_ALL
Default searches all search type constant
|
static java.lang.String |
TYPE_EXACT
TYPE_EXACT pattern match constant
|
static java.lang.String |
TYPE_LIKE
TYPE_LIKE pattern match constant
|
Constructor and Description |
---|
AccountListDataBean()
Creates an AccountListDataBean
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildQuery()
Constructs the database query according to the search criteria type.
|
java.lang.String |
buildQueryByCriteriaType(int criteriaType)
Constructs a query string to retrieve all accounts match to the
search criteria type.
|
java.lang.String |
buildQueryOriginal()
Constructs the database query.
|
java.lang.String |
buildQueryTotalAccountsForSearch()
Constructs a query string to find out how many accounts available
in system (excluding the one has been marked for deleted).
|
void |
buildResultDataBean(java.util.Vector resultVector)
Constructs the list of data beans according to the search criteria type
|
void |
buildResultDataBeanOriginal(java.util.Vector resultVector)
Constructs the list of data beans
|
void |
buildResultDataBeanTotalAccountsForSearch(java.util.Vector resultVector)
Constructs the list of data beans
|
AccountDataBean[] |
getAccountList()
Gets the list of entries that were found
|
AccountDataBean |
getAccountListData(int index)
Gets a specific entry that was found
|
com.ibm.commerce.security.Protectable |
getDelegate()
Returns the access control delegate of this data bean
|
boolean |
getLightWeightAccountDataBeanFlag()
Checks the flag of using lightweight data bean approach
|
AccountDataBean[] |
getMarkForDeleteAccountList()
Gets the list of accounts that have been marked to be deleted
|
int |
getNumberOfAccounts()
Gets the number of accounts
|
java.lang.Long |
getOwner()
Returns the member reference number of the owner of the account
|
int |
getSearchCriteriaType()
Returns the search criteria type that has been set in method setSearchCriteriaType(int searchType).
|
java.lang.String |
getSearchKeyword()
Returns the Search keyword that has been set in method setSearchKeyword(String searchString).
|
int |
getSearchMaxThreshold()
Returns the threshold of maximum search results that has been set in method setSearchMaxThreshold(int maxNumOfResult).
The default value is 100.
|
java.lang.String |
getSearchName()
Gets the search name parameter.
|
java.lang.String |
getSearchNameFilter()
Gets the search name filter parameter.
|
boolean |
hasNumOfSearchResultsExceededMax()
Checks the recent search results exceeding specified threshold.
|
void |
setAccountList(java.util.Vector newAccountList)
Sets the list of results found
|
void |
setAccountNameLike(java.lang.String anl)
Sets the search parameter for the account name
|
void |
setLightWeightAccountDataBeanFlag(boolean turnOn)
Toggle the flag indicating to use lightweight account data bean
during populating.
|
void |
setNumberOfAccounts(int numberOfAccounts)
Sets the number of accounts
|
void |
setSearchCriteria(int searchType,
java.lang.String searchString,
int maxNumOfResult)
To specify the search criteria option before populating the data bean.
|
void |
setSearchCriteriaType(int searchType)
To specify the search criteria type before populating the data bean.
|
void |
setSearchKeyword(java.lang.String searchString)
To specify the search keyword string before populating the data bean.
|
void |
setSearchMaxThreshold(int maxNumOfResult)
To specify the threshold of maximum search results before populating the data bean.
|
void |
setSearchName(java.lang.String searchName)
Sets the search name parameter.
|
void |
setSearchNameFilter(java.lang.String searchNameFilter)
Sets the search name filter parameter
|
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
fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
getRequestProperties, setRequestProperties
public static final java.lang.String ORDER_BY_CUSTOMER
public static final java.lang.String ORDER_BY_REPRESENTATIVE
public static final int SEARCHTYPE_ACCOUNT_COUNT
public static final int SEARCHTYPE_EXACT_MATCH
public static final int SEARCHTYPE_IGNORE_CASE_BEGIN
public static final int SEARCHTYPE_IGNORE_CASE_CONTAIN
public static final int SEARCHTYPE_MATCH_CASE_BEGIN
public static final int SEARCHTYPE_MATCH_CASE_CONTAIN
public static final int SEARCHTYPE_SEARCH_ALL
public static final java.lang.String TYPE_EXACT
public static final java.lang.String TYPE_LIKE
public java.lang.String buildQuery() throws java.lang.Exception
buildQuery
in class com.ibm.commerce.tools.util.CommonSearchHelperBean
java.lang.Exception
public java.lang.String buildQueryByCriteriaType(int criteriaType)
criteriaType
- the search criteria, valid options are listed
as below, and an invalid option will be default to type '4'.public java.lang.String buildQueryOriginal() throws java.lang.Exception
java.lang.Exception
public java.lang.String buildQueryTotalAccountsForSearch()
public void buildResultDataBean(java.util.Vector resultVector)
buildResultDataBean
in class com.ibm.commerce.tools.util.CommonSearchHelperBean
resultVector
- the result vector returned from the query executionpublic void buildResultDataBeanOriginal(java.util.Vector resultVector)
resultVector
- the result vector returned from the query executionpublic void buildResultDataBeanTotalAccountsForSearch(java.util.Vector resultVector)
resultVector
- the result vector returned from the query executionpublic AccountDataBean[] getAccountList()
public AccountDataBean getAccountListData(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- the index of the result arrayjava.lang.ArrayIndexOutOfBoundsException
public com.ibm.commerce.security.Protectable getDelegate() throws java.lang.Exception
getDelegate
in interface com.ibm.commerce.security.Delegator
java.lang.Exception
public boolean getLightWeightAccountDataBeanFlag()
public AccountDataBean[] getMarkForDeleteAccountList()
public int getNumberOfAccounts()
public java.lang.Long getOwner() throws java.lang.Exception
getOwner
in interface com.ibm.commerce.security.Protectable
java.lang.Exception
public int getSearchCriteriaType()
public java.lang.String getSearchKeyword()
public int getSearchMaxThreshold()
public java.lang.String getSearchName()
public java.lang.String getSearchNameFilter()
public boolean hasNumOfSearchResultsExceededMax()
public void setAccountList(java.util.Vector newAccountList)
newAccountList
- the result list to setpublic void setAccountNameLike(java.lang.String anl)
anl
- the number of accountspublic void setLightWeightAccountDataBeanFlag(boolean turnOn)
turnOn
- set 'true' to apply the lightweight data bean approach
or 'false' to enforce each account data bean to populate.public void setNumberOfAccounts(int numberOfAccounts)
numberOfAccounts
- the number of accountspublic void setSearchCriteria(int searchType, java.lang.String searchString, int maxNumOfResult)
searchType
- specify the search criteria option. The valid options:searchString
- account name to be searched. If searchType = 0 or 9, this
parameter will be ignored and not used.maxNumOfResult
- the threshold of max. search results. For performance purpose,
this number restricts the total number of search result data beans that will
be instantiated and populated. If the number of accounts
is greater, this bean will not instantiate
and populate individual account data beans from the results. Caller
program may examine this condition by using the method
hasNumOfSearchResultsExceededMax().
If you specify '-1' or other negative values for this parameter, the max.
search result threshold will not apply. This bean will instantiate & populate
all the account data beans from the search results set regardless the number
of accounts found.
This maxNumberOfResult parameter does not apply if searchType is set to '9'.public void setSearchCriteriaType(int searchType)
searchType
- specify the search criteria option, the valid options:public void setSearchKeyword(java.lang.String searchString)
searchString
- account name to be searched. If searchType = 0 or 9, this
parameter will be ignored and not used.public void setSearchMaxThreshold(int maxNumOfResult)
maxNumOfResult
- the threshold of max. search results. For performance purpose,
this number restricts the total number of search result data beans that will
be instantiated and populated. If the number of accounts found from the search
is greater than this maxNumOfResult value, then this bean will not instantiate
and populate individual account data beans from the search results set. Caller
program may examine this condition by using the method
hasNumOfSearchResultsExceededMax().
If you specify '-1' or other negative values for this parameter, the max.
search result threshold will not apply. This bean will instantiate & populate
all the account data beans from the search results set regardless the number
of accounts found.
This maxNumOfResult parameter does not apply if searchType is set to '9'.public void setSearchName(java.lang.String searchName)
searchName
- the search name to setpublic void setSearchNameFilter(java.lang.String searchNameFilter)
searchNameFilter
- sets the name search filter