com.jgoodies.bookfinder.domain
Class SearchResult

java.lang.Object
  extended by com.jgoodies.bookfinder.domain.SearchResult

public final class SearchResult
extends Object

Describes search results as returned by the Amazon.com web services. The result is either an error message, or a list of items plus the number of total results.

Version:
$Revision: 1.6 $
Author:
Karsten Lentzsch

Constructor Summary
SearchResult()
          Constructs an empty SearchResult.
 
Method Summary
 void addBook(Book book)
           
 List getBooks()
          Returns the list of items that matched the search.
 String getErrorMsg()
          Returns the errorMsg.
 long getTotalPages()
          Returns the total number of pages.
 long getTotalResults()
          Returns the total number of results.
 void setErrorMsg(String errorMsg)
          Sets the errorMsg.
 void setTotalPages(long totalPages)
          Sets the total number of pages.
 void setTotalResults(long totalResults)
          Sets the totalResults.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResult

public SearchResult()
Constructs an empty SearchResult.

Method Detail

getBooks

public List getBooks()
Returns the list of items that matched the search.

Returns:
a List of items

addBook

public void addBook(Book book)

getErrorMsg

public String getErrorMsg()
Returns the errorMsg.

Returns:
the error message

getTotalResults

public long getTotalResults()
Returns the total number of results.

Returns:
the total number of results

getTotalPages

public long getTotalPages()
Returns the total number of pages.

Returns:
the total number of pages

setErrorMsg

public void setErrorMsg(String errorMsg)
Sets the errorMsg.

Parameters:
errorMsg - The errorMsg to set

setTotalResults

public void setTotalResults(long totalResults)
Sets the totalResults.

Parameters:
totalResults - The totalResults to set

setTotalPages

public void setTotalPages(long totalPages)
Sets the total number of pages.

Parameters:
totalPages - The number of pages to set


Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.