com.evdb.javaapi.data.request
Class EventSearchRequest

java.lang.Object
  extended by com.evdb.javaapi.data.request.SearchRequest
      extended by com.evdb.javaapi.data.request.EventSearchRequest

public class EventSearchRequest
extends SearchRequest

Class encapsulating event search operations

Sample code for search for events:

      EventOperations eo = new EventOperations();
        EventSearchRequest esr = new EventSearchRequest();

        esr.setLocation("San Diego");
        esr.setDateRange("2012050200-2013052100");
        esr.setPageSize(20);
        esr.setPageNumber(1);
        // These 2 lines will set the timeout to 60 seconds.Normally not needed
        // Unless you are using Google App Engine
        esr.setConnectionTimeout(60000);  // Used with Google App Engine only
        esr.setReadTimeout(60000);        // Used with Google App Engine only
        SearchResult sr = null;
        try {
                sr = eo.search(esr);
                if (sr.getTotalItems() > 1) {

                System.out.println("Total items: " + sr.getTotalItems());
                }
        }catch(EVDBRuntimeException var){
                System.out.println("Opps got runtime an error...");
        } catch( EVDBAPIException var){
                System.out.println("Opps got runtime an error...");
        }

        

Author:
dreiter

Nested Class Summary
static class EventSearchRequest.SortOrder
          Sort order for searches
 
Nested classes/interfaces inherited from class com.evdb.javaapi.data.request.SearchRequest
SearchRequest.SortDirection
 
Constructor Summary
EventSearchRequest()
           
 
Method Summary
 java.lang.String getCategory()
           
 java.lang.String getDateRange()
           
 java.lang.String getSortOrder()
           
 void setCategory(java.lang.String category)
           
 void setDateRange(java.lang.String dateRange)
           
 void setSortOrder(EventSearchRequest.SortOrder sortOrder)
           
 
Methods inherited from class com.evdb.javaapi.data.request.SearchRequest
getChangeMultiDayStart, getConnectionTimeOut, getIncludes, getKeywords, getLocation, getLocationRadius, getLocationUnits, getPageNumber, getPageSize, getReadTimeOut, getSortDirection, setChangeMultiDayStart, setConnectionTimeout, setIncludes, setKeywords, setLocation, setLocationRadius, setLocationUnits, setPageNumber, setPageSize, setReadTimeout, setSortDirection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventSearchRequest

public EventSearchRequest()
Method Detail

getCategory

public java.lang.String getCategory()
Returns:
the category

setCategory

public void setCategory(java.lang.String category)
Parameters:
category - the category to set

getDateRange

public java.lang.String getDateRange()
Returns:
the dateRange

setDateRange

public void setDateRange(java.lang.String dateRange)
Parameters:
dateRange - the dateRange to set

getSortOrder

public java.lang.String getSortOrder()
Specified by:
getSortOrder in class SearchRequest
Returns:
the sortOrder

setSortOrder

public void setSortOrder(EventSearchRequest.SortOrder sortOrder)
Parameters:
sortOrder - the sortOrder to set


Copyright © 2007 Eventful Inc. All Rights Reserved.