public class GiftRegistrySearchDataBeanBase extends SmartDataBeanImpl implements SmartDataBean, InputDataBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASSNAME
The Classname.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
protected boolean | findSimilarMatchesSpecified
Return true if it is specified to search for similar results using SOUNDEX
|
Constructor and Description |
---|
GiftRegistrySearchDataBeanBase()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected WhereClauseCondition | createOrClauseFromArray(int[] orClause, java.lang.String TableName, java.lang.String astrFieldName)
Helper method that turns an array of integers into an OR condition; for example, status ={1,2} results in a where clause of: ((status=1) OR (status=2)) This can then be used with an AND condition.
|
protected java.util.Vector | executeSimilarMatchesSearchOnDB2()
Performs a similar matches search on DB2.
|
protected java.util.Vector | findGiftRegistries()
Returns a vector for giftRegistryId that are based on the getCompleteWhereClause().
|
CommandContext | getCommandContext()
Gets the command context set within this bean.
|
protected WhereClauseCondition | getCompleteWhereClause()
Returns the where clause created by this bean
|
java.lang.String | getCountry()
Gets the country being searched on if set.
|
int | getCurrentPageNumber()
Returns the current page number in the result set (based on page size -- if page size is zero or null, this function returns 1)
|
java.lang.String | getEmail1()
Gets an email address being searched on if set.
|
int | getEndIndex()
Returns the end index for the result set on the page.
|
java.lang.String | getEventDay()
Gets the event day being searched on if set.
|
java.lang.String | getEventMonth()
Gets the event month being searched on if set.
|
java.lang.String | getEventTypeId()
Gets the ID of the gift registry's event type
|
java.lang.String | getEventYear()
Gets the event year being searched on if set.
|
java.lang.String | getExternalId()
Gets the gift registry externalId being searched on if set.
|
boolean | getFindSimilarMatches()
Gets similar search result value.
|
java.lang.String | getFirstName()
Gets the first name being searched on if set.
|
int[] | getGuestOption()
Gets the guestOption of a gift registry to search for.
|
java.lang.String | getLastName()
Gets the last name being searched on if set.
|
java.lang.String | getMaxResultsPerPage()
Gets the maximum results to display per page.
|
int | getNumberOfResultsOnPage()
Returns the number of results that are available on this particular page.
|
GiftRegistryDataBean[] | getRegistries()
Returns matches for the specified search criteria
|
TypedProperty | getRequestProperties()
Returns the request properties of the data bean.
|
int | getResultCount()
Returns the total number of results that were found matching the query specified.
|
protected com.ibm.commerce.component.giftregistry.commands.GenerateGiftRegistrySearchKeyValuesCmd | getSearchKeyGenerator()
Returns the instance of GenerateGiftRegistrySearchKeyValuesCmd which generates the search key values for firstname and lastname which will be used while performing the similar matches search.
|
java.lang.String | getSortBy()
An integer index into the following list of sortable criteria supported in this bean.
|
java.lang.String | getSortByFieldName()
Gets the sortBy field name
|
java.lang.String | getSortByTableName()
Gets the Sort By table name
|
java.lang.String | getSortByType()
Gets the registrant type used for the sorting.
|
java.lang.String | getStartIndex()
Gets the index of the first search result returned
|
java.lang.String | getState()
Gets the state to be searched on if set
|
int[] | getStatus()
Gets the status of a gift registry to search for.
|
java.lang.String | getStoreId()
Gets the storeId to run the search against
|
int | getTotalPages()
Returns the number of pages that are in this result count.
|
int[] | getType()
Gets the type of a gift registry to search for.
|
java.lang.String | getUserId()
Gets the userId being searched on if set.
|
protected WhereClauseCondition | getWhereClauseCondition()
This method creates a where clause condition, using the AND condition for the following values: - GRGFTREG.STOREID - GRGFTREG.GUESTACCESSOPTION - GRGFTREG.TYPE - GRGFTREG.STATUS The following options will user the AND condition if they are set in the request to this bean: - GRGFTREG.EVENTDATE - GRADDR.LASTNAME - GRADDR.FIRSTNAME - GRADDR.STATE - GRADDR.COUNTRY - GRRGSTRNT.USERID To add more search criteria, extend this class and append to the where clause.
|
protected WhereClauseCondition | getWhereClauseCondition(boolean isSearchKeyQuery)
/** This method creates a where clause condition, using the AND condition for the following values: GRGFTREG.STOREID GRGFTREG.GUESTACCESSOPTION GRGFTREG.TYPE GRGFTREG.STATUS The following options will user the AND condition if they are set in the request to this bean: GRGFTREG.EVENTDATE GRADDR.LASTNAME GRADDR.FIRSTNAME GRADDR.STATE GRADDR.COUNTRY GRRGSTRNT.USERID
|
boolean | isFindSimilarMatches()
Returns true if this bean is set to search for similar results.
|
boolean | isNextPageExists()
Determines whether a next page of data exists
|
protected boolean | isOrderByAddress()
Returns true if it is specified that sorting will use a field in the GRADDR or GRRGSTRNT table
|
boolean | isPreviousPageExists()
Determines whether a previous page of data exists
|
protected boolean | isSoundexSupported()
Deprecated.
- This method is no longer used because the SOUNDEX search implementation has changed. The SOUNDEX search is now performed using search key columns in the GRADDR table.
|
protected boolean | isValidOrderByTableNameAndField()
This will return false if sortByFieldName is specified while sortByTableName is not.
|
void | populate()
Populates the data bean
|
protected void | preProcessQuery(ECGiftRegistryQuery aQuery)
If you want to extend GiftRegistrySearchDataBeanBase to sort or search by new table fields, you will override this method.
|
void | setCommandContext(CommandContext commandContext)
Sets the command context.
|
protected void | setCompleteWhereClause(WhereClauseCondition condition)
Sets the where clause to be used by this bean
|
void | setCountry(java.lang.String string)
Sets the country to be searched on if set
|
void | setEmail1(java.lang.String string)
Sets an e-mail address to be searched on
|
void | setEventDay(java.lang.String string)
Sets the country to be searched on if set
|
void | setEventMonth(java.lang.String string)
Sets the event month to be searched on if set
|
void | setEventTypeId(java.lang.String id)
Sets the ID of the event type that is associated with the gift registry
|
void | setEventYear(java.lang.String string)
Sets the event year to be searched on if set
|
void | setExternalId(java.lang.String string)
Sets the gift registry externalId to be searched on
|
void | setFindSimilarMatches(boolean bSimilarMatches)
Sets this bean to search for similar search results.
|
void | setFirstName(java.lang.String string)
Sets the first name to be searched on if set
|
void | setGuestOption(int[] integer)
Sets the guestOption of a gift registry to search for.
|
void | setLastName(java.lang.String string)
Sets the last name to be searched on if set
|
void | setMaxResultsPerPage(java.lang.String string)
Sets the maximum results to display per page.
|
void | setRequestProperties(TypedProperty param)
Sets the requestProperties associated with the data bean.
|
void | setResetSearchBean()
Resets this bean.
|
protected void | setResultCount(int resultCount)
Sets the number of results found in this query
|
void | setSortBy(java.lang.String string)
Sets an integer index into the following list of sortable criteria supported in this bean.
|
void | setSortByFieldName(java.lang.String aSortByFieldName)
Set the sortBy field name.
|
void | setSortByTableName(java.lang.String aSortByTableName)
Sets the Sort By table name.
|
void | setSortByType(java.lang.String aSortByRegistrantType)
Sets the registrant type used for the sorting.
|
void | setStartIndex(java.lang.String string)
Sets the index of the first search result to return.
|
void | setState(java.lang.String string)
Sets the state to be searched on if set
|
void | setStatus(int[] integer)
Sets the status of a gift registry to search for.
|
void | setStoreId(java.lang.String string)
Sets the storeId to run the search against
|
void | setType(int[] integer)
Sets the type of a gift registry to search for.
|
void | setUserId(java.lang.String string)
Sets the userId to be searched on
|
protected boolean | useSearchKeyColumns()
Similar matches search is partially conducted using the search key columns in the GRADDR table.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
protected boolean findSimilarMatchesSpecified
public GiftRegistrySearchDataBeanBase()
public CommandContext getCommandContext()
public void setCommandContext(CommandContext commandContext)
public TypedProperty getRequestProperties()
public void setRequestProperties(TypedProperty param) throws java.lang.Exception
public void populate() throws java.lang.Exception
protected WhereClauseCondition createOrClauseFromArray(int[] orClause, java.lang.String TableName, java.lang.String astrFieldName)
protected boolean isSoundexSupported()
protected WhereClauseCondition getWhereClauseCondition()
protected java.util.Vector findGiftRegistries()
protected java.util.Vector executeSimilarMatchesSearchOnDB2()
The method uses the getWhereClauseCondition(boolean) to construct the where clause.
Both the starts-with and sounds like queries are constructed separately and the ECGiftRegistryQuery.executeUnionQuery(ECGiftRegistryQuery) to run the union query.
protected WhereClauseCondition getWhereClauseCondition(boolean isSearchKeyQuery)
To add more search criteria, extend this class and append to the where clause. The method is only invoked for similar matches search on DB2. It is invoked twice by toggling the boolean parameter. The boolean parameter indicates if the starts-with query is being constructed or the sounds-like query is being constructed.
public GiftRegistryDataBean[] getRegistries()
public void setResetSearchBean()
public int getResultCount()
protected void setResultCount(int resultCount)
public int getTotalPages()
public int getCurrentPageNumber()
public int getEndIndex()
public boolean isPreviousPageExists()
public boolean isNextPageExists()
public java.lang.String getCountry()
public void setCountry(java.lang.String string)
public java.lang.String getEventDay()
public void setEventDay(java.lang.String string)
public java.lang.String getEventMonth()
public void setEventMonth(java.lang.String string)
public java.lang.String getEventYear()
public void setEventYear(java.lang.String string)
public java.lang.String getFirstName()
public void setFirstName(java.lang.String string)
public java.lang.String getLastName()
public void setLastName(java.lang.String string)
public java.lang.String getState()
public void setState(java.lang.String string)
public java.lang.String getUserId()
public void setUserId(java.lang.String string)
public void setEventTypeId(java.lang.String id)
public java.lang.String getEventTypeId()
public java.lang.String getExternalId()
public void setExternalId(java.lang.String string)
public java.lang.String getEmail1()
public void setEmail1(java.lang.String string)
public java.lang.String getMaxResultsPerPage()
public void setMaxResultsPerPage(java.lang.String string)
public java.lang.String getStartIndex()
public void setStartIndex(java.lang.String string)
public java.lang.String getStoreId()
public void setStoreId(java.lang.String string)
public java.lang.String getSortBy()
public void setSortBy(java.lang.String string)
public int[] getStatus()
public void setStatus(int[] integer)
public int[] getType()
public void setType(int[] integer)
public int[] getGuestOption()
public void setGuestOption(int[] integer)
public boolean isFindSimilarMatches()
public void setFindSimilarMatches(boolean bSimilarMatches)
public boolean getFindSimilarMatches()
public int getNumberOfResultsOnPage()
protected WhereClauseCondition getCompleteWhereClause()
protected void setCompleteWhereClause(WhereClauseCondition condition)
protected void preProcessQuery(ECGiftRegistryQuery aQuery)
protected boolean isOrderByAddress()
public java.lang.String getSortByType()
public void setSortByType(java.lang.String aSortByRegistrantType)
public java.lang.String getSortByTableName()
public void setSortByTableName(java.lang.String aSortByTableName)
public java.lang.String getSortByFieldName()
public void setSortByFieldName(java.lang.String aSortByFieldName)
protected boolean isValidOrderByTableNameAndField()
protected com.ibm.commerce.component.giftregistry.commands.GenerateGiftRegistrySearchKeyValuesCmd getSearchKeyGenerator()
The search key columns of GRADDR will not be used if the instance returns null values. This method returns the instance provided by the GiftRegistryCmdHelper method.
protected boolean useSearchKeyColumns()
This method returns true, if the GenerateGiftRegistrySearchKeyValuesCmd instance provided by GiftRegistrySearchDataBeanBase#getSearchKeyGenerator() method returns non-null values.