com.evdb.javaapi.data.request
Class SearchRequest

java.lang.Object
  extended by com.evdb.javaapi.data.request.SearchRequest
Direct Known Subclasses:
DemandSearchRequest, EventSearchRequest, PerformerSearchRequest, VenueSearchRequest

public abstract class SearchRequest
extends java.lang.Object

Simple Search Request Object. Perform searches using one of the class-spectific search request objects

Author:
tylerv

Nested Class Summary
static class SearchRequest.SortDirection
          Types of Sort Direction
 
Constructor Summary
SearchRequest()
           
 
Method Summary
 int getConnectionTimeOut()
          Get the connection timeout
 java.lang.String getKeywords()
          Return search phrase
 java.lang.String getLocation()
          Get the search location
 int getLocationRadius()
          Get the location radius
 java.lang.String getLocationUnits()
          Get the location units
 int getPageNumber()
          Page number of search results
 int getPageSize()
          Page size, default is 10
 int getReadTimeOut()
          Get the read timeout
 SearchRequest.SortDirection getSortDirection()
          Sort direction
abstract  java.lang.String getSortOrder()
           
 void setConnectionTimeout(int timeout)
          Set the connection timeout (for users of Google App Engine that need to change the default of 5 seconds)
Non Google App Engine users should not need to set this.
 void setKeywords(java.lang.String keywords)
          Set the search phrase
 void setLocation(java.lang.String location)
          Set the location.
 void setLocationRadius(int locationRadius)
          Set the location radius
 void setLocationUnits(java.lang.String locationUnits)
          Set the location units.
 void setPageNumber(int pageNumber)
          Set the page number of search results to return.
 void setPageSize(int pageSize)
          Number of items displayed on a page of search results.
 void setReadTimeout(int timeout)
          Set the read timeout (for users of Google App Engine that need to change the default of 5 seconds)
Non Google App Engine users should not need to set this.
 void setSortDirection(SearchRequest.SortDirection sortDirection)
          Set sort direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchRequest

public SearchRequest()
Method Detail

getSortOrder

public abstract java.lang.String getSortOrder()

getKeywords

public java.lang.String getKeywords()
Return search phrase

Returns:
the keywords

setKeywords

public void setKeywords(java.lang.String keywords)
Set the search phrase

Parameters:
keywords - the keywords to set

getLocation

public java.lang.String getLocation()
Get the search location

Returns:
the location

getConnectionTimeOut

public int getConnectionTimeOut()
Get the connection timeout

Returns:
the connectTimeOut (in ms)

getReadTimeOut

public int getReadTimeOut()
Get the read timeout

Returns:
the readTimeOut (in ms)

setConnectionTimeout

public void setConnectionTimeout(int timeout)
Set the connection timeout (for users of Google App Engine that need to change the default of 5 seconds)
Non Google App Engine users should not need to set this.

Parameters:
timeout - the connectTimeOut to set (in ms) (0 is the defualt which disables the timeout)

setReadTimeout

public void setReadTimeout(int timeout)
Set the read timeout (for users of Google App Engine that need to change the default of 5 seconds)
Non Google App Engine users should not need to set this.

Parameters:
timeout - the readTimeOut to set (in ms) (0 is the defualt which disables the timeout)

setLocation

public void setLocation(java.lang.String location)
Set the location. Empty (or null) means search all locations

Parameters:
location - the location to set

getLocationRadius

public int getLocationRadius()
Get the location radius

Returns:
the locationRadius

setLocationRadius

public void setLocationRadius(int locationRadius)
Set the location radius

Parameters:
locationRadius - the locationRadius to set

getLocationUnits

public java.lang.String getLocationUnits()
Get the location units

Returns:
the locationUnits

setLocationUnits

public void setLocationUnits(java.lang.String locationUnits)
Set the location units. Either "mi" or "km". Default is "mi"

Parameters:
locationUnits - the locationUnits to set

getPageNumber

public int getPageNumber()
Page number of search results

Returns:
the pageNumber

setPageNumber

public void setPageNumber(int pageNumber)
Set the page number of search results to return. Default is 1

Parameters:
pageNumber - the pageNumber to set

getPageSize

public int getPageSize()
Page size, default is 10

Returns:
the pageSize

setPageSize

public void setPageSize(int pageSize)
Number of items displayed on a page of search results. Default is 10

Parameters:
pageSize - the pageSize to set

getSortDirection

public SearchRequest.SortDirection getSortDirection()
Sort direction

Returns:
the sortDirection

setSortDirection

public void setSortDirection(SearchRequest.SortDirection sortDirection)
Set sort direction. Default is SortDirection.ASCENDING

Parameters:
sortDirection - the sortDirection to set


Copyright © 2007 Eventful Inc. All Rights Reserved.