atg.integrations.taxware
Class ZipResult

java.lang.Object
  extended by atg.integrations.taxware.ZipResult

public class ZipResult
extends java.lang.Object

The ZipResult class represents the result of a request for zip verification information. It contains, among other things, an array of ZipResultItems.

It also contains an index which represents the user's choice from the array.

See the verazip documentation for a detailed description of what the various fields mean in practice.

See Also:
ZipRequest, ZipResultItem, VeraZipCaller, FieldSet, OutputRecordDef

Field Summary
static java.lang.String CLASS_VERSION
           
protected  byte m_flagsVary
          A bit verctor representing the fields which vary accross return items.
protected  int m_idxChosen
          The index of the chosen ZipResultItem.
protected  int m_iErrorCode
          Error code returned by request
protected  ZipResultItem[] m_rgResultItems
          Our array of zip result items
protected  java.lang.String m_strErrorMessage
          Error string returned by request
 
Method Summary
 int getChosenIndex()
          Get the chosen index.
 boolean getCitiesVary()
          Returns true if city varies amoung the result items.
 boolean getCityLimitsVary()
          Returns true if city limits vary amoung the result items.
 boolean getCountiesVary()
          Returns true if county names vary amoung the result items.
 java.lang.String getDescriptionAt(int idx)
          Returns the description for the item at index idx.
protected  java.lang.String getDescriptionForItem(ZipResultItem item)
          Generates the string used to describe a given item.
 java.lang.String[] getDescriptions()
          Returns the array of descriptions.
 int getErrorCode()
          Returns the error code associated with the ZipResult.
 java.lang.String getErrorMessage()
          Gets the error message associated with the zip result.
 ZipResultItem getResultItemAt(int idx)
          Returns the ZipResultItem at the specified index.
 int getResultItemCount()
          Returns a count of the result items.
 boolean getStatesVary()
          Returns true if state codes vary amoung the result items.
 boolean getZipsVary()
          Returns true if FirstZipCode varies amoung the result items.
 boolean matchesCityStateZip(java.lang.String strCity, java.lang.String strState, java.lang.String strZip)
          Returns true if the value stored in this ZipResult matches the specifiers in the ZipRequest passed in.
 boolean matchesRequest(ZipRequest zrequest)
          Returns true if the value stored in this ZipResult matches the specifiers in the ZipRequest passed in.
 void setChosenIndex(int pChosenIndex)
          Set the chosen index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

m_rgResultItems

protected ZipResultItem[] m_rgResultItems
Our array of zip result items


m_iErrorCode

protected int m_iErrorCode
Error code returned by request


m_strErrorMessage

protected java.lang.String m_strErrorMessage
Error string returned by request


m_flagsVary

protected byte m_flagsVary
A bit verctor representing the fields which vary accross return items.


m_idxChosen

protected int m_idxChosen
The index of the chosen ZipResultItem. Starts out is -1.

Method Detail

getResultItemAt

public ZipResultItem getResultItemAt(int idx)
Returns the ZipResultItem at the specified index.


getDescriptions

public java.lang.String[] getDescriptions()
Returns the array of descriptions. The descriptions are display text which allow the user to identify the various options.


getDescriptionForItem

protected java.lang.String getDescriptionForItem(ZipResultItem item)
Generates the string used to describe a given item. Always specifies city, state and zip, but only specified county or within/outside city limits when necessary. Should be called only after the varies bits have been set.


getDescriptionAt

public java.lang.String getDescriptionAt(int idx)
Returns the description for the item at index idx.


getResultItemCount

public int getResultItemCount()
Returns a count of the result items.


getErrorCode

public int getErrorCode()
Returns the error code associated with the ZipResult.


getErrorMessage

public java.lang.String getErrorMessage()
Gets the error message associated with the zip result.


getZipsVary

public boolean getZipsVary()
Returns true if FirstZipCode varies amoung the result items.


getCitiesVary

public boolean getCitiesVary()
Returns true if city varies amoung the result items.


getCityLimitsVary

public boolean getCityLimitsVary()
Returns true if city limits vary amoung the result items.


getCountiesVary

public boolean getCountiesVary()
Returns true if county names vary amoung the result items.


getStatesVary

public boolean getStatesVary()
Returns true if state codes vary amoung the result items.


matchesRequest

public boolean matchesRequest(ZipRequest zrequest)
Returns true if the value stored in this ZipResult matches the specifiers in the ZipRequest passed in.

Used to determine if we need to go back to VeraZip to generate a new ZipResult.


matchesCityStateZip

public boolean matchesCityStateZip(java.lang.String strCity,
                                   java.lang.String strState,
                                   java.lang.String strZip)
Returns true if the value stored in this ZipResult matches the specifiers in the ZipRequest passed in.

Used to determine if we need to go back to VeraZip to generate a new ZipResult.


setChosenIndex

public void setChosenIndex(int pChosenIndex)
Set the chosen index. The chosen index specifies the user's choice of ZipOptions.


getChosenIndex

public int getChosenIndex()
Get the chosen index. The chosen index specifies user's choice of ZipOptions. Returns -1 if the user's choice has not been set.