com.ibm.commerce.giftregistry.beans

Class UsersGiftRegistryDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, java.io.Serializable


    public class UsersGiftRegistryDataBean
    extends SmartDataBeanImpl
    The UsersGiftRegistryDataBean returns the unique list of userIds that match both a customer and gift registry. It is a page level bean that is used on the GiftConsultantSearchResultsDisplay.jsp It takes care of paging the results
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UsersGiftRegistryDataBean

        public UsersGiftRegistryDataBean()
    • Method Detail

      • getGiftRegistrySearchDataBean

        public GiftRegistrySearchDataBean getGiftRegistrySearchDataBean()
        Gets the GiftRegistrySearchDataBean that was set
        Returns:
        GiftRegistrySearchDataBean or null if none was set
      • getUsersSearchDataBean

        public UserSearchDataBean getUsersSearchDataBean()
        Gets the UsersSearchDataBean that was set
        Returns:
        UsersSearchDataBean or null if none was set
      • setGiftRegistrySearchDataBean

        public void setGiftRegistrySearchDataBean(GiftRegistrySearchDataBean bean)
        Sets the GiftRegistrySearchDataBean
        Parameters:
        bean - GiftRegistrySearchDataBean
      • setUsersSearchDataBean

        public void setUsersSearchDataBean(UserSearchDataBean bean)
        Set the UsersSearchDataBean
        Parameters:
        bean - - UsersSearchDataBean
      • getUserIds

        public java.util.Vector getUserIds()
        Returns the entire unique set of matching userIds from the customer and gift registry search
        Returns:
        Vector of string, where each string is a userId
      • getUserIdsForPage

        public java.util.List getUserIdsForPage()
        Returns the subset of the unique set of matching userIds from the customer and gift registry search for the current page
        Returns:
        Vector of string. where each string is a userId
      • setResetSearchBean

        public void setResetSearchBean()
        Resets this bean. If a search is run once, it will not be run again unless this method is called. This will force the getRegistries() and findGiftRegistries() methods to go back to the database and gather new results.
      • getResultCount

        public int getResultCount()
        Returns the total number of results that were found matching the query specified. This value is set after calling findGiftRegistries() or getRegistries().
        Returns:
        totalResultSetCount
      • getTotalPages

        public int getTotalPages()
        Returns the number of pages that are in this result count. getResultCount() / getMaxResultsPerPage()
        Returns:
        totalNumberOfPages
      • getCurrentPageNumber

        public 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)
        Returns:
        the current page number in the result set
      • getEndIndex

        public int getEndIndex()
        Returns the end index for the result set on the page. The end index identifies the last element result of any page from total number of elements in result set.
        Returns:
        the end index
      • isPreviousPageExists

        public boolean isPreviousPageExists()
        Determines whether or not a previous page of data exists
        Returns:
        true if there is a previous page, false otherwise
      • isNextPageExists

        public boolean isNextPageExists()
        Determines whether or not a next page of data exists
        Returns:
        true if there is a next page, false otherwise
      • getMaxResultsPerPage

        public java.lang.String getMaxResultsPerPage()
        Gets the maximum results to display per page. Default is 20.
        Returns:
        maxResultsPerPage
      • setMaxResultsPerPage

        public void setMaxResultsPerPage(java.lang.String string)
        Sets the maximum results to display per page. Default is 20. Search results returned begin at startIndex and end at index startIndex plus maxResultsPerPage
        Parameters:
        maxResultsPerPage -
      • getStartIndex

        public java.lang.String getStartIndex()
        Gets the index of the first search result returned
        Returns:
        startIndex
      • setStartIndex

        public void setStartIndex(java.lang.String string)
        Sets the index of the first search result to return. Search results returned begin at startIndex and end at index startIndex plus maxResultsPerPage
        Parameters:
        string -
      • getNumberOfResultsOnPage

        public int getNumberOfResultsOnPage()
        Returns the number of results that are available on this particular page.
        Returns:
        numberOfResultsOnPage