|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.electricvine.ZipSearch
This method finds matching companies using ZipCode (or City) within specified radius.
Field Summary | |
java.util.ArrayList |
m_sortParameters
|
static int |
OPT_CACHE
Turns on caching |
static int |
OPT_LOG
Logs searches |
static int |
OPT_PAGING
Turns paging on |
static int |
OPT_RANDOMIZE
Turns on random number generator |
static int |
OPT_USER_AUTHENTICATION
Require user authentication |
Constructor Summary | |
ZipSearch()
Used as a property of ZipSearch object to store results of the zipcode/city search. |
|
ZipSearch(DataSource oDataSource)
Initializes a new instance of the ZipSearch class. |
Method Summary | |
void |
addSortParameter(SortParameter sortParameter)
|
void |
ClearCache()
Clears the company ID cache |
void |
finish()
Cleans up any existing database connections Must be called before destroying the ZipSearch object. |
java.lang.String[] |
getCachedCompanyIDs()
Returns cached company IDs when Caching is turned ON. |
java.lang.String |
getCity()
Property used to return the searched city. |
DataSource |
getDataSource()
This returns the data source object. |
java.lang.String |
getFilter()
This returns the expression used to filter which rows are returned in the result set. |
int |
getNumResults()
Returns the number of results in the zip search result set. |
int |
getOptions()
The property used to access options that have been set. |
java.lang.String |
getOrderBy()
Returns the "ORDER BY" clause that is used in the query. |
int |
getPageSize()
Returns the number of records that will be returned for a single page. |
java.lang.String |
getPassword()
Returns the password. |
int |
getRadius()
Property used to return the searched radius. |
ZipSearchResults |
getResults()
The property used to access object of type 'ZipSearchResults' that holds records returned when executing Run method. |
java.util.ArrayList |
getSortParameters()
Returns sort paramters array list. |
int |
getStartIndex()
Returns index of the first result record to return. |
int |
getStartPage()
Returns the start page used during paging to indicate which page to return. |
java.lang.String |
getState()
The property used to return the searched state. |
java.lang.String |
getUsername()
This returns the username. |
java.lang.String |
getZipCode()
Property used to return the searched zip code. |
void |
removeAllSortParameters()
|
boolean |
Run()
This will execute ZipSearch after setting all the required properties. |
void |
setCachedCompanyIDs(java.lang.String[] aCachedCompanyIDs)
Used when Caching is turned ON to store cached CompanyIDs To turn on caching add OPT_CACHE to ZipSearch.Options property. |
void |
setCity(java.lang.String sCity)
This assigns the city name to the ZipSearch object. |
void |
setDataSource(DataSource oDataSource)
Used to specify database, tables and fields used for running ZipCode search. |
void |
setFilter(java.lang.String sFilter)
Sets the expression used to filter which rows are returned in the result set. |
void |
setNumResults(int nNumResults)
Sets the number of results that will be returned in a single query. |
void |
setOptions(int nOptions)
The ZipSearch object allows you to set options such as whether or not to use paging or user authentication for tracking search usage You can use multiple options at the same time using OR operator. |
void |
setOrderBy(java.lang.String sOrderBy)
Assigns the "ORDER BY" clause that is used in the query. |
void |
setPageSize(int nPageSize)
Sets the number of records that will be returned for a single page. |
void |
setPassword(java.lang.String sPassword)
Sets the password. |
void |
setRadius(int nRadius)
Assigns the radius to zipsearch object. |
void |
setSortParameters(java.util.ArrayList sortParameters)
Sets the sort parameters. |
void |
setStartIndex(int nStartIndex)
Specifies index of the first result record to return. |
void |
setStartPage(int nStartPage)
Assign start page used during paging to indicate which page to return. |
void |
setState(java.lang.String sState)
This assigns the state to the ZipSearch object. |
void |
setUsername(java.lang.String sUsername)
Sets the username. |
void |
setZipCode(java.lang.String sZipCode)
This assigns the zip code that will be searched. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int OPT_PAGING
public static final int OPT_USER_AUTHENTICATION
public static final int OPT_LOG
public static final int OPT_CACHE
public static final int OPT_RANDOMIZE
public java.util.ArrayList m_sortParameters
Constructor Detail |
public ZipSearch()
public ZipSearch(DataSource oDataSource)
oDataSource
- contains properties used to connect to the database.
The properties can be changed through ZipSearch DataSource property.Method Detail |
public DataSource getDataSource()
public void setDataSource(DataSource oDataSource)
oDataSource
- contains properties used to connect to the database.
The properties can be changed through ZipSearch.DataSource property.public ZipSearchResults getResults()
public int getOptions()
public void setOptions(int nOptions)
public java.lang.String getZipCode()
public void setZipCode(java.lang.String sZipCode)
public int getRadius()
public void setRadius(int nRadius)
public java.lang.String getCity()
public void setCity(java.lang.String sCity)
public java.lang.String getState()
public void setState(java.lang.String sState)
public java.lang.String getFilter()
public void setFilter(java.lang.String sFilter)
public java.lang.String getOrderBy()
public void setOrderBy(java.lang.String sOrderBy)
public int getStartIndex()
public void setStartIndex(int nStartIndex)
public int getNumResults()
public void setNumResults(int nNumResults)
public int getStartPage()
public void setStartPage(int nStartPage)
public int getPageSize()
public void setPageSize(int nPageSize)
public java.lang.String getUsername()
public void setUsername(java.lang.String sUsername)
public java.lang.String getPassword()
public void setPassword(java.lang.String sPassword)
public java.lang.String[] getCachedCompanyIDs()
public void setCachedCompanyIDs(java.lang.String[] aCachedCompanyIDs)
public void setSortParameters(java.util.ArrayList sortParameters)
public java.util.ArrayList getSortParameters()
public void addSortParameter(SortParameter sortParameter)
public void removeAllSortParameters()
public boolean Run()
public void ClearCache()
public void finish()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |