com.electricvine
Class ZipSearchResults

java.lang.Object
  |
  +--com.electricvine.ZipSearchResults

public class ZipSearchResults
extends java.lang.Object

Initializes a new instance of a ZipSearch class.


Method Summary
 int getCount()
          Returns number of records in DataSet.
 java.util.Vector getDataSet()
          Contains records returned as a result of running ZipSearch as a vector.
example:
com.electricvine.ZipSearchResults zsr = null;
java.util.Vector results = null;
if ( submit>0 ) {
if ( zs.Run() ) {
zsr = zs.getResults();
results = zsr.getDataSet();
total = results.size();
}
else {
error = com.electricvine.LastError.getDescription();
}
}

for (int i=0; (i < offset) && (start+i < total); i++) {
row = (java.util.Hashtable) results.elementAt(i);

name = (String)row.get("name");
street1 = (String)row.get("street1");
street2 = (String)row.get("street2");
city = (String)row.get("city");
state = (String)row.get("state");
zip = (String)row.get("zip");
phone = (String)row.get("phone");
fax = (String)row.get("fax");
email = (String)row.get("email");
url = (String)row.get("url");
user1 = (String)row.get("user1");
user2 = (String)row.get("user2");
user3 = (String)row.get("user3");
distance = (String)(row.get("distance")).toString();

//Make sure distance is readable
distance = formatDistance(distance);
}
 int getTotalRecordsCount()
          Returns total number of records that match parameters of associated ZipSearch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataSet

public java.util.Vector getDataSet()
Contains records returned as a result of running ZipSearch as a vector.
example:
com.electricvine.ZipSearchResults zsr = null;
java.util.Vector results = null;
if ( submit>0 ) {
if ( zs.Run() ) {
zsr = zs.getResults();
results = zsr.getDataSet();
total = results.size();
}
else {
error = com.electricvine.LastError.getDescription();
}
}

for (int i=0; (i < offset) && (start+i < total); i++) {
row = (java.util.Hashtable) results.elementAt(i);

name = (String)row.get("name");
street1 = (String)row.get("street1");
street2 = (String)row.get("street2");
city = (String)row.get("city");
state = (String)row.get("state");
zip = (String)row.get("zip");
phone = (String)row.get("phone");
fax = (String)row.get("fax");
email = (String)row.get("email");
url = (String)row.get("url");
user1 = (String)row.get("user1");
user2 = (String)row.get("user2");
user3 = (String)row.get("user3");
distance = (String)(row.get("distance")).toString();

//Make sure distance is readable
distance = formatDistance(distance);
}


getCount

public int getCount()
Returns number of records in DataSet.


getTotalRecordsCount

public int getTotalRecordsCount()
Returns total number of records that match parameters of associated ZipSearch.