org.opengts.db.tables
Class Geozone

java.lang.Object
  extended by org.opengts.dbtools.DBRecord<RT>
      extended by org.opengts.db.AccountRecord<Geozone>
          extended by org.opengts.db.tables.Geozone

public class Geozone
extends AccountRecord<Geozone>


Nested Class Summary
static class Geozone.GeozoneType
           
static class Geozone.Key
           
 
Nested classes/interfaces inherited from class org.opengts.db.AccountRecord
AccountRecord.AccountKey<RT extends DBRecord>
 
Nested classes/interfaces inherited from class org.opengts.dbtools.DBRecord
DBRecord.DBChangeListener
 
Field Summary
static java.lang.String _TABLE_NAME
           
static double CLIENT_GEOPOINT_DELTA
           
static double CLIENT_RADIUS_DELTA_METERS
           
static DBField[] CorridorFieldInfo
           
static java.lang.String FLD_arrivalStatusCode
           
static java.lang.String FLD_arrivalZone
           
static java.lang.String FLD_autoNotify
           
static java.lang.String FLD_city
           
static java.lang.String FLD_clientID
           
static java.lang.String FLD_clientUpload
           
static java.lang.String FLD_contactPhone
           
static java.lang.String FLD_corrEndSelector
           
static java.lang.String FLD_corridorID
           
static java.lang.String FLD_corrStartSelector
           
static java.lang.String FLD_country
           
static java.lang.String FLD_departureStatusCode
           
static java.lang.String FLD_departureZone
           
static java.lang.String FLD_geozoneID
           
static java.lang.String FLD_groupID
           
static java.lang.String FLD_iconName
           
static java.lang.String FLD_latitude1
           
static java.lang.String FLD_latitude10
           
static java.lang.String FLD_latitude2
           
static java.lang.String FLD_latitude3
           
static java.lang.String FLD_latitude4
           
static java.lang.String FLD_latitude5
           
static java.lang.String FLD_latitude6
           
static java.lang.String FLD_latitude7
           
static java.lang.String FLD_latitude8
           
static java.lang.String FLD_latitude9
           
static java.lang.String FLD_longitude1
           
static java.lang.String FLD_longitude10
           
static java.lang.String FLD_longitude2
           
static java.lang.String FLD_longitude3
           
static java.lang.String FLD_longitude4
           
static java.lang.String FLD_longitude5
           
static java.lang.String FLD_longitude6
           
static java.lang.String FLD_longitude7
           
static java.lang.String FLD_longitude8
           
static java.lang.String FLD_longitude9
           
static java.lang.String FLD_maxLatitude
           
static java.lang.String FLD_maxLongitude
           
static java.lang.String FLD_minLatitude
           
static java.lang.String FLD_minLongitude
           
static java.lang.String FLD_postalCode
           
static java.lang.String FLD_priority
           
static java.lang.String FLD_radius
           
static java.lang.String FLD_reverseGeocode
           
static java.lang.String FLD_shapeColor
           
static java.lang.String FLD_sortID
           
static java.lang.String FLD_speedLimitKPH
           
static java.lang.String FLD_stateProvince
           
static java.lang.String FLD_streetAddress
           
static java.lang.String FLD_subdivision
           
static java.lang.String FLD_vertices
           
static java.lang.String FLD_zonePurposeID
           
static java.lang.String FLD_zoneType
           
static java.lang.String FLD_zoomRegion
           
static java.lang.String GEOZONE_ALL
           
static double MAX_RADIUS_METERS
           
static double MIN_RADIUS_METERS
           
static DBField[] PriorityFieldInfo
           
 
Fields inherited from class org.opengts.db.AccountRecord
FLD_accountID, FLD_displayName, FLD_isActive, FLD_notes
 
Fields inherited from class org.opengts.dbtools.DBRecord
errorDescription, excludedUpdateFields, FLD_creationMillis, FLD_creationTime, FLD_description, FLD_lastUpdateAccount, FLD_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR, tempProps
 
Constructor Summary
Geozone()
           
Geozone(Geozone.Key key)
           
 
Method Summary
 void clearGeoPoints()
           
static boolean containsPoint(Account account, java.lang.String zoneId, GeoPoint gp)
           
 boolean containsPoint(GeoPoint gp)
           
static boolean containsPoint(java.lang.String acctId, java.lang.String zoneId, GeoPoint gp)
           
 boolean encodeDMTPZone(Payload payload, int ptCnt, boolean hiRes)
           
static boolean exists(java.lang.String acctID, java.lang.String zoneID, int sortID)
           
 int getArrivalStatusCode()
          Gets the status code to use when generating an "Arrive" event.
 boolean getArrivalZone()
          Returns true if this instance can be used for arrival detection.
 boolean getAutoNotify()
          Gets the auto-notification state.
 GeoBounds getBoundingBox()
          Gets the GeoBounds for this Geozone
static GeoBounds getBoundingBox(Geozone.GeozoneType zoneType, GeoPoint[] gp, double radiusM)
          Gets the bounding box for the specified zone
 GeoPoint getCenterGeoPoint()
          Gets the geozone approximate center GeoPoint
 java.lang.String getCity()
          Gets the city-address for this geozone.
 int getClientID()
           
static Geozone[] getClientIDZones(java.lang.String acctId, long clientId)
           
 boolean getClientUpload()
           
static Geozone[] getClientUploadZones(java.lang.String acctId)
           
 java.lang.String getContactPhone()
          Gets the contact-phone of for this geozone.
 java.lang.String getCorrEndSelector()
           
 java.lang.String getCorridorID()
          Gets the corridor-id assigned to this geozone.
 java.lang.String getCorrStartSelector()
           
 java.lang.String getCountry()
          Gets the country for this geozone.
 int getDepartureStatusCode()
          Gets the status code to use when generating a "Depart" event.
 boolean getDepartureZone()
          Returns true if this instance can be used for departure detection.
static java.lang.String getDescription(Account account, GeoPoint gp)
           
static java.lang.String getDescription(java.lang.String acctID, GeoPoint gp)
           
 double getEastLongitude()
           
static DBFactory<Geozone> getFactory()
           
static Geozone getFirstGeozoneForDevice(Geozone[] gza, java.lang.String deviceID)
          Returns the first Geozone in the specified lizt that is applicable to the specified DeviceID.
 GeoPoint getGeoPointAt(int ndx, GeoPoint dft)
           
 GeoPoint[] getGeoPoints()
           
static Geozone[] getGeozone(Account account, java.lang.String geozoneID)
           
static Geozone getGeozone(Account account, java.lang.String zoneID, GeoPoint gp, boolean reverseGeocodeOnly)
           
static Geozone getGeozone(Account account, java.lang.String geozoneID, int sortID, boolean create)
           
static Geozone getGeozone(java.lang.String acctID, java.lang.String zoneID, GeoPoint gp, boolean reverseGeocodeOnly)
           
static Geozone getGeozone(java.lang.String acctID, java.lang.String zoneID, GeoPoint gp, java.lang.String purposeID, boolean reverseGeocodeOnly)
           
static Geozone getGeozoneForDevice(java.lang.String acctID, GeoPoint gp, java.lang.String devID)
          Returns the first (highest priority) Geozone in which the point resides that is also applicable for the specified DeviceID.
static Geozone getGeozoneForPurpose(java.lang.String acctID, GeoPoint gp, java.lang.String purID)
          Returns the first Geozone in which the point resides that is also applicable for the specified Purpose (ie.
 java.lang.String getGeozoneID()
          Gets the geozoneID key
static java.lang.String[] getGeozoneIDs(DBSelect<Geozone> dsel)
           
static java.lang.String[] getGeozoneIDsForAccount(java.lang.String acctId)
           
static Geozone[] getGeozones(java.lang.String acctID, GeoBounds gb)
           
static Geozone[] getGeozones(java.lang.String acctID, GeoPoint gp)
           
static Geozone.GeozoneType getGeozoneType(Geozone z)
           
static Geozone.GeozoneType getGeozoneType(int zt)
           
 java.lang.String getGroupID()
           
 java.lang.String getIconName()
           
 boolean getIsActive()
          Gets the Geozone active state
 double getLatitude1()
           
 double getLatitude2()
           
 double getLatitude3()
           
 double getLatitude4()
           
 double getLatitude5()
           
 double getLatitude6()
           
 double getLatitude7()
           
 double getLatitude8()
           
 double getLongitude1()
           
 double getLongitude2()
           
 double getLongitude3()
           
 double getLongitude4()
           
 double getLongitude5()
           
 double getLongitude6()
           
 double getLongitude7()
           
 double getLongitude8()
           
static double GetMaximumRadius()
          Gets the maximum geozone radius in meters
static double GetMaximumRadius(int gzType)
          Gets the maximum geozone radius in meters, for the specified Geozone type.
 double getMaxLatitude()
          Gets the geozone bounding maximum latitude
 double getMaxLongitude()
          Gets the geozone bounding maximum longitude
static int GetMaxVerticesCount()
           
static double GetMinimumRadius()
          Gets the minimum geozone radius in meters
static double GetMinimumRadius(int gzType)
          Gets the minimum geozone radius in meters, for the specified Geozone type
 double getMinLatitude()
          Gets the geozone bounding minimum latitude
 double getMinLongitude()
          Gets the geozone bounding minimum longitude
 double getNorthLatitude()
           
 java.lang.String getPostalCode()
          Gets the postal code for this geozone.
 int getPriority()
          Gets the geozone overlap priority
 int getPushpinIconIndex(OrderedSet<java.lang.String> iconKeys)
          Gets the pushpin icon index for the specified pushpin id
 int getPushpinIconIndex(OrderedSet<java.lang.String> iconKeys, int dft)
          Gets the pushpin icon index for the specified pushpin id
 int getRadius()
           
 double getRadiusKilometers()
           
 double getRadiusMeters()
           
 double getRadiusMeters(double minValue, double maxValue)
           
 boolean getReverseGeocode()
          Returns true if this instance can be used for reverse-geocoding the location with the Geozone description.
 java.lang.String getShapeColor()
           
 java.lang.String getShapeColor(java.lang.String dftColor)
           
 int getSortID()
          Gets the sort index
 double getSouthLatitude()
           
 double getSpeedLimitKPH()
          Gets the geozone speed limit
 java.lang.String getStateProvince()
          Gets the state/province for this geozone.
 java.lang.String getStreetAddress()
          Gets the street-address for this geozone.
 java.lang.String getSubdivision()
          Gets the subdivision-code for this geozone.
static java.lang.String getTableDescription(java.util.Locale loc)
          Gets this table description
 java.lang.String getVertices()
           
 java.util.List<GeoPoint> getVerticesList(java.util.List<GeoPoint> gpList)
           
 double getWestLongitude()
           
static java.lang.String getWhereClause(java.lang.String acctId, long clientId)
           
static java.lang.String getWhereClause(java.lang.String acctId, java.lang.String zoneId, int sortId, GeoBounds bounds, GeoPoint centerGP, boolean activeOnly, boolean clientUploadOnly, boolean reverseGeocodeOnly)
           
 java.lang.String getZonePurposeID()
           
 int getZoneType()
          Gets the geozone type
 java.lang.String getZoneTypeDescription(java.util.Locale loc)
          Gets the geozone type description
 boolean getZoomRegion()
          Gets the zoom-region state.
 boolean hasBoundingBox()
           
 boolean hasCorridorID()
          Returns true if a corridor-id has been assigned to this geozone.
 boolean hasGroupID()
           
 boolean hasRadius()
           
 void insert()
          Sets Geozone bounding-box and inserts the GeoZone into the table
 boolean isArrivalZone()
          Deprecated. 
 boolean isArrivalZone(java.lang.String deviceID)
          Returns true if this instance can be used for arrival detection.
 boolean isAutoNotify()
          Returns the auto-notification state for this geozone.
 boolean isClientUpload()
           
 boolean isCorridorEnd(EventData ev)
           
 boolean isCorridorStart(EventData ev)
           
 boolean isDepartureZone()
          Deprecated. 
 boolean isDepartureZone(java.lang.String deviceID)
          Returns true if this instance can be used for departure detection.
 boolean isDeviceInGroup(java.lang.String deviceID)
          Returns true if the current Geozone is applicable to the specified DeviceID
static boolean IsGeozoneTypeSupported(Geozone.GeozoneType type)
           
static boolean IsGeozoneTypeSupported(int type)
           
static boolean IsGlobalActive()
          Returns true if all Geozones should be considered active (thus ignoring the "getIsActive()" false setting.
static boolean isPointOfInterest(Geozone z)
           
 boolean isReverseGeocode(java.lang.String deviceID)
          Returns true if this instance can be used for reverse-geocoding the location with the Geozone description.
 boolean isZonePurposeID(java.lang.String v)
           
 boolean isZoomRegion()
          Returns the zoom-region state for this geozone.
static void listZones(java.lang.String acctId, boolean update)
           
static void main(java.lang.String[] argv)
           
 boolean resetBoundingBox()
          Resets the bounding area for this GeoZone
 void setArrivalStatusCode(int v)
          Sets the status code to use when generating an "Arrive" event.
 void setArrivalZone(boolean v)
          Sets whether this instance can be used for arrival detection.
 void setAutoNotify(boolean v)
          Sets the auto-notification state.
 void setCity(java.lang.String v)
          Sets the city-address for this geozone.
 void setClientID(int v)
           
 void setClientUpload(boolean v)
           
 void setContactPhone(java.lang.String v)
          Sets the contact-phone of for this geozone.
 void setCorrEndSelector(boolean v)
           
 void setCorridorID(java.lang.String v)
          Sets the corridor-id assigned to this geozone.
 void setCorrStartSelector(boolean v)
           
 void setCountry(java.lang.String v)
          Sets the country for this geozone.
 void setCreationDefaultValues()
          Override to set default values
 void setDefaultRadius()
           
 void setDepartureStatusCode(int v)
          Sets the status code to use when generating a "Depart" event.
 void setDepartureZone(boolean v)
          Sets whether this instance can be used for departure detection.
 void setGeoPoints(GeoPoint[] gp)
           
 void setGeoPoints(java.util.List<GeoPoint> gpList)
           
 void setGeozoneID(java.lang.String v)
          Sets the geozoneID key
 void setGroupID(java.lang.String v)
           
 void setIconName(java.lang.String v)
           
 void setLatitude1(double v)
           
 void setLatitude2(double v)
           
 void setLatitude3(double v)
           
 void setLatitude4(double v)
           
 void setLatitude5(double v)
           
 void setLatitude6(double v)
           
 void setLatitude7(double v)
           
 void setLatitude8(double v)
           
 void setLongitude1(double v)
           
 void setLongitude2(double v)
           
 void setLongitude3(double v)
           
 void setLongitude4(double v)
           
 void setLongitude5(double v)
           
 void setLongitude6(double v)
           
 void setLongitude7(double v)
           
 void setLongitude8(double v)
           
 void setMaxLatitude(double v)
          Sets the geozone bounding maximum latitude
 void setMaxLongitude(double v)
          Sets the geozone bounding maximum longitude
 void setMinLatitude(double v)
          Sets the geozone bounding minimum latitude
 void setMinLongitude(double v)
          Sets the geozone bounding minimum longitude
 void setPostalCode(java.lang.String v)
          Sets the postal code for this geozone.
 void setPriority(int v)
          Sets the geozone overlap priority
 void setRadius(int v)
           
 void setReverseGeocode(boolean v)
          Sets whether this instance can be used for reverse-geocoding
 void setShapeColor(java.lang.String v)
           
 void setSortID(int v)
          Sets the sort index
 void setSpeedLimitKPH(double v)
          Sets the geozone speed limit
 void setStateProvince(java.lang.String v)
          Sets the state/province for this geozone.
 void setStreetAddress(java.lang.String v)
          Sets the street-address for this geozone.
 void setSubdivision(java.lang.String v)
          Sets the subdivision-code for this geozone.
 void setVertices(java.lang.String v)
           
 void setVerticesList(java.util.List<GeoPoint> gpList)
           
protected  void setZoneChanged()
          Sets the zone changed flag
 void setZonePurposeID(java.lang.String v)
           
 void setZoneType(Geozone.GeozoneType v)
          Sets the geozone type
 void setZoneType(int v)
          Sets the geozone type
 void setZoneType(java.lang.String v, java.util.Locale locale)
          Sets the geozone type
 void setZoomRegion(boolean v)
          Sets the zoom-region state.
static boolean supportsCorridor()
          Returns true if this zone supports GeoCorridor information.
static boolean supportsPriority()
          Returns true if this table supports overlap priority
static boolean supportsSpeedLimitKPH()
          Returns true if this table supports speed limit
static java.lang.String TABLE_NAME()
           
 void update(java.util.Set<java.lang.String> updFldSet)
          Sets Geozone bounding-box and inserts the GeoZone into the table
 void update(java.lang.String... updFldArray)
          Sets Geozone bounding-box and inserts the GeoZone into the table
 
Methods inherited from class org.opengts.db.AccountRecord
createSystemAdminAccount, getAccount, getAccountDescription, getAccountID, getDisplayName, getFilteredID, getFilteredID, getNotes, GetSimpleLocalString, getSystemAdminAccount, getSystemAdminAccountID, hasAccount, hasSystemAdminAccountID, isAccountManager, isActive, isSystemAdmin, isSystemAdmin, isSystemAdminAccountID, isValidID, newField_accountID, newField_accountID, newField_displayName, newField_displayName, newField_isActive, newField_isActive, newField_notes, newField_notes, setAccount, setDisplayName, setIsActive, setNotes, setRuntimeDefaultValues
 
Methods inherited from class org.opengts.dbtools.DBRecord
_getFactory, _reload, addChangedNotification, addExcludedUpdateFields, adjustStringLength_1, adjustStringLength, appendFieldValues, clearChanged, clearError, clearExcludedUpdateFields, clearLastCaughtSQLException, equals, excludeFieldFromUpdate, excludeFieldFromUpdate, fireChangeNotification, geKeyValue, getCreationDateTime, getCreationMillis, getCreationTime, GetCurrentAccount, GetCurrentUser, getDefaultFieldValueKey, getDescription, getErrorDescription, getFactory, getFactory, getField, getFieldBoolean, getFieldDateTime, getFieldDouble, getFieldFloat, getFieldInt, getFieldLong, getFieldName, getFieldString, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getKeyValue, getLastCaughtSQLException, getLastUpdateAccount, getLastUpdateTime, getLastUpdateTime, getLastUpdateUser, getNextGroup, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordKey, getRecords, getRecords, getTemporaryProperties, getValue, getVirtual, hasChanged, hasError, hasField, hasFieldValue, hasOptionalFieldValue, hasTemporaryProperties, isFieldUnsigned, isLastCaughtSQLExceptionErrorCode, isOkToReload, isOkToSave, isValidating, isVirtual, lock, lockRead, lockWrite, newField_creationMillis, newField_creationTime, newField_creationTime, newField_description, newField_description, newField_lastUpdateAccount, newField_lastUpdateAccount, newField_lastUpdateTime, newField_lastUpdateUser, newField_lastUpdateUser, printXML, printXML, printXML, printXML, printXML, printXML, recordDidInsert, recordDidUpdate, recordWillInsert, recordWillUpdate, reload, reload, removeChangedNotification, save, select, select, select, setAllFieldValues, setAllFieldValues, setAllFieldValues, setAllFieldValues, setChanged, setChanged, setCreationMillis, setCreationTime, SetCurrentAccount, SetCurrentUser, setDescription, setError, setError, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setIgnoreInvalidFields, setKeyValue, setLastCaughtSQLException, setLastUpdateAccount, setLastUpdateTime, setLastUpdateUser, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setValidating, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVirtual, toString, toXML, toXML, toXML, toXML, toXML, unlock, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GEOZONE_ALL

public static final java.lang.String GEOZONE_ALL
See Also:
Constant Field Values

MIN_RADIUS_METERS

public static final double MIN_RADIUS_METERS
See Also:
Constant Field Values

MAX_RADIUS_METERS

public static final double MAX_RADIUS_METERS
See Also:
Constant Field Values

CLIENT_RADIUS_DELTA_METERS

public static final double CLIENT_RADIUS_DELTA_METERS
See Also:
Constant Field Values

CLIENT_GEOPOINT_DELTA

public static final double CLIENT_GEOPOINT_DELTA
See Also:
Constant Field Values

_TABLE_NAME

public static final java.lang.String _TABLE_NAME
See Also:
Constant Field Values

FLD_geozoneID

public static final java.lang.String FLD_geozoneID
See Also:
Constant Field Values

FLD_sortID

public static final java.lang.String FLD_sortID
See Also:
Constant Field Values

FLD_minLatitude

public static final java.lang.String FLD_minLatitude
See Also:
Constant Field Values

FLD_maxLatitude

public static final java.lang.String FLD_maxLatitude
See Also:
Constant Field Values

FLD_minLongitude

public static final java.lang.String FLD_minLongitude
See Also:
Constant Field Values

FLD_maxLongitude

public static final java.lang.String FLD_maxLongitude
See Also:
Constant Field Values

FLD_zonePurposeID

public static final java.lang.String FLD_zonePurposeID
See Also:
Constant Field Values

FLD_reverseGeocode

public static final java.lang.String FLD_reverseGeocode
See Also:
Constant Field Values

FLD_arrivalZone

public static final java.lang.String FLD_arrivalZone
See Also:
Constant Field Values

FLD_arrivalStatusCode

public static final java.lang.String FLD_arrivalStatusCode
See Also:
Constant Field Values

FLD_departureZone

public static final java.lang.String FLD_departureZone
See Also:
Constant Field Values

FLD_departureStatusCode

public static final java.lang.String FLD_departureStatusCode
See Also:
Constant Field Values

FLD_autoNotify

public static final java.lang.String FLD_autoNotify
See Also:
Constant Field Values

FLD_zoomRegion

public static final java.lang.String FLD_zoomRegion
See Also:
Constant Field Values

FLD_shapeColor

public static final java.lang.String FLD_shapeColor
See Also:
Constant Field Values

FLD_iconName

public static final java.lang.String FLD_iconName
See Also:
Constant Field Values

FLD_zoneType

public static final java.lang.String FLD_zoneType
See Also:
Constant Field Values

FLD_radius

public static final java.lang.String FLD_radius
See Also:
Constant Field Values

FLD_vertices

public static final java.lang.String FLD_vertices
See Also:
Constant Field Values

FLD_latitude1

public static final java.lang.String FLD_latitude1
See Also:
Constant Field Values

FLD_longitude1

public static final java.lang.String FLD_longitude1
See Also:
Constant Field Values

FLD_latitude2

public static final java.lang.String FLD_latitude2
See Also:
Constant Field Values

FLD_longitude2

public static final java.lang.String FLD_longitude2
See Also:
Constant Field Values

FLD_latitude3

public static final java.lang.String FLD_latitude3
See Also:
Constant Field Values

FLD_longitude3

public static final java.lang.String FLD_longitude3
See Also:
Constant Field Values

FLD_latitude4

public static final java.lang.String FLD_latitude4
See Also:
Constant Field Values

FLD_longitude4

public static final java.lang.String FLD_longitude4
See Also:
Constant Field Values

FLD_latitude5

public static final java.lang.String FLD_latitude5
See Also:
Constant Field Values

FLD_longitude5

public static final java.lang.String FLD_longitude5
See Also:
Constant Field Values

FLD_latitude6

public static final java.lang.String FLD_latitude6
See Also:
Constant Field Values

FLD_longitude6

public static final java.lang.String FLD_longitude6
See Also:
Constant Field Values

FLD_latitude7

public static final java.lang.String FLD_latitude7
See Also:
Constant Field Values

FLD_longitude7

public static final java.lang.String FLD_longitude7
See Also:
Constant Field Values

FLD_latitude8

public static final java.lang.String FLD_latitude8
See Also:
Constant Field Values

FLD_longitude8

public static final java.lang.String FLD_longitude8
See Also:
Constant Field Values

FLD_latitude9

public static final java.lang.String FLD_latitude9
See Also:
Constant Field Values

FLD_longitude9

public static final java.lang.String FLD_longitude9
See Also:
Constant Field Values

FLD_latitude10

public static final java.lang.String FLD_latitude10
See Also:
Constant Field Values

FLD_longitude10

public static final java.lang.String FLD_longitude10
See Also:
Constant Field Values

FLD_clientUpload

public static final java.lang.String FLD_clientUpload
See Also:
Constant Field Values

FLD_clientID

public static final java.lang.String FLD_clientID
See Also:
Constant Field Values

FLD_groupID

public static final java.lang.String FLD_groupID
See Also:
Constant Field Values

FLD_streetAddress

public static final java.lang.String FLD_streetAddress
See Also:
Constant Field Values

FLD_city

public static final java.lang.String FLD_city
See Also:
Constant Field Values

FLD_stateProvince

public static final java.lang.String FLD_stateProvince
See Also:
Constant Field Values

FLD_postalCode

public static final java.lang.String FLD_postalCode
See Also:
Constant Field Values

FLD_country

public static final java.lang.String FLD_country
See Also:
Constant Field Values

FLD_subdivision

public static final java.lang.String FLD_subdivision
See Also:
Constant Field Values

FLD_contactPhone

public static final java.lang.String FLD_contactPhone
See Also:
Constant Field Values

FLD_priority

public static final java.lang.String FLD_priority
See Also:
Constant Field Values

FLD_speedLimitKPH

public static final java.lang.String FLD_speedLimitKPH
See Also:
Constant Field Values

PriorityFieldInfo

public static final DBField[] PriorityFieldInfo

FLD_corrStartSelector

public static final java.lang.String FLD_corrStartSelector
See Also:
Constant Field Values

FLD_corrEndSelector

public static final java.lang.String FLD_corrEndSelector
See Also:
Constant Field Values

FLD_corridorID

public static final java.lang.String FLD_corridorID
See Also:
Constant Field Values

CorridorFieldInfo

public static final DBField[] CorridorFieldInfo
Constructor Detail

Geozone

public Geozone()

Geozone

public Geozone(Geozone.Key key)
Method Detail

GetMinimumRadius

public static double GetMinimumRadius(int gzType)
Gets the minimum geozone radius in meters, for the specified Geozone type


GetMinimumRadius

public static double GetMinimumRadius()
Gets the minimum geozone radius in meters


GetMaximumRadius

public static double GetMaximumRadius(int gzType)
Gets the maximum geozone radius in meters, for the specified Geozone type.


GetMaximumRadius

public static double GetMaximumRadius()
Gets the maximum geozone radius in meters


getGeozoneType

public static Geozone.GeozoneType getGeozoneType(Geozone z)

getGeozoneType

public static Geozone.GeozoneType getGeozoneType(int zt)

isPointOfInterest

public static boolean isPointOfInterest(Geozone z)

IsGlobalActive

public static boolean IsGlobalActive()
Returns true if all Geozones should be considered active (thus ignoring the "getIsActive()" false setting.


getIsActive

public boolean getIsActive()
Gets the Geozone active state

Overrides:
getIsActive in class AccountRecord<Geozone>

TABLE_NAME

public static java.lang.String TABLE_NAME()

getFactory

public static DBFactory<Geozone> getFactory()

getTableDescription

public static java.lang.String getTableDescription(java.util.Locale loc)
Gets this table description


getGeozoneID

public java.lang.String getGeozoneID()
Gets the geozoneID key


setGeozoneID

public void setGeozoneID(java.lang.String v)
Sets the geozoneID key


getSortID

public int getSortID()
Gets the sort index


setSortID

public void setSortID(int v)
Sets the sort index


supportsPriority

public static boolean supportsPriority()
Returns true if this table supports overlap priority


getPriority

public int getPriority()
Gets the geozone overlap priority


setPriority

public void setPriority(int v)
Sets the geozone overlap priority


supportsSpeedLimitKPH

public static boolean supportsSpeedLimitKPH()
Returns true if this table supports speed limit


getSpeedLimitKPH

public double getSpeedLimitKPH()
Gets the geozone speed limit


setSpeedLimitKPH

public void setSpeedLimitKPH(double v)
Sets the geozone speed limit


getMinLatitude

public double getMinLatitude()
Gets the geozone bounding minimum latitude


setMinLatitude

public void setMinLatitude(double v)
Sets the geozone bounding minimum latitude


getMaxLatitude

public double getMaxLatitude()
Gets the geozone bounding maximum latitude


setMaxLatitude

public void setMaxLatitude(double v)
Sets the geozone bounding maximum latitude


getMinLongitude

public double getMinLongitude()
Gets the geozone bounding minimum longitude


setMinLongitude

public void setMinLongitude(double v)
Sets the geozone bounding minimum longitude


getMaxLongitude

public double getMaxLongitude()
Gets the geozone bounding maximum longitude


setMaxLongitude

public void setMaxLongitude(double v)
Sets the geozone bounding maximum longitude


getCenterGeoPoint

public GeoPoint getCenterGeoPoint()
Gets the geozone approximate center GeoPoint


getZoneType

public int getZoneType()
Gets the geozone type


setZoneType

public void setZoneType(int v)
Sets the geozone type


setZoneType

public void setZoneType(Geozone.GeozoneType v)
Sets the geozone type


setZoneType

public void setZoneType(java.lang.String v,
                        java.util.Locale locale)
Sets the geozone type


getZoneTypeDescription

public java.lang.String getZoneTypeDescription(java.util.Locale loc)
Gets the geozone type description


hasRadius

public boolean hasRadius()

getRadiusMeters

public double getRadiusMeters()

getRadiusMeters

public double getRadiusMeters(double minValue,
                              double maxValue)

getRadiusKilometers

public double getRadiusKilometers()

getRadius

public int getRadius()

setRadius

public void setRadius(int v)

setDefaultRadius

public void setDefaultRadius()

getShapeColor

public java.lang.String getShapeColor(java.lang.String dftColor)

getShapeColor

public java.lang.String getShapeColor()

setShapeColor

public void setShapeColor(java.lang.String v)

getIconName

public java.lang.String getIconName()

setIconName

public void setIconName(java.lang.String v)

getPushpinIconIndex

public int getPushpinIconIndex(OrderedSet<java.lang.String> iconKeys,
                               int dft)
Gets the pushpin icon index for the specified pushpin id

Parameters:
iconKeys - The icon pushpinID map
dft - The default pushpin index if the pushpinID is not found or blank
Returns:
The pushpin index, or 'dft' if not found

getPushpinIconIndex

public int getPushpinIconIndex(OrderedSet<java.lang.String> iconKeys)
Gets the pushpin icon index for the specified pushpin id

Parameters:
iconKeys - The icon pushpinID map
Returns:
The pushpin index, or -1 if not found

getNorthLatitude

public double getNorthLatitude()

getSouthLatitude

public double getSouthLatitude()

getWestLongitude

public double getWestLongitude()

getEastLongitude

public double getEastLongitude()

getVertices

public java.lang.String getVertices()

setVertices

public void setVertices(java.lang.String v)

getVerticesList

public java.util.List<GeoPoint> getVerticesList(java.util.List<GeoPoint> gpList)

setVerticesList

public void setVerticesList(java.util.List<GeoPoint> gpList)

getLatitude1

public double getLatitude1()

setLatitude1

public void setLatitude1(double v)

getLongitude1

public double getLongitude1()

setLongitude1

public void setLongitude1(double v)

getLatitude2

public double getLatitude2()

setLatitude2

public void setLatitude2(double v)

getLongitude2

public double getLongitude2()

setLongitude2

public void setLongitude2(double v)

getLatitude3

public double getLatitude3()

setLatitude3

public void setLatitude3(double v)

getLongitude3

public double getLongitude3()

setLongitude3

public void setLongitude3(double v)

getLatitude4

public double getLatitude4()

setLatitude4

public void setLatitude4(double v)

getLongitude4

public double getLongitude4()

setLongitude4

public void setLongitude4(double v)

getLatitude5

public double getLatitude5()

setLatitude5

public void setLatitude5(double v)

getLongitude5

public double getLongitude5()

setLongitude5

public void setLongitude5(double v)

getLatitude6

public double getLatitude6()

setLatitude6

public void setLatitude6(double v)

getLongitude6

public double getLongitude6()

setLongitude6

public void setLongitude6(double v)

getLatitude7

public double getLatitude7()

setLatitude7

public void setLatitude7(double v)

getLongitude7

public double getLongitude7()

setLongitude7

public void setLongitude7(double v)

getLatitude8

public double getLatitude8()

setLatitude8

public void setLatitude8(double v)

getLongitude8

public double getLongitude8()

setLongitude8

public void setLongitude8(double v)

GetMaxVerticesCount

public static int GetMaxVerticesCount()

getGeoPoints

public GeoPoint[] getGeoPoints()

getGeoPointAt

public GeoPoint getGeoPointAt(int ndx,
                              GeoPoint dft)

clearGeoPoints

public void clearGeoPoints()

setGeoPoints

public void setGeoPoints(java.util.List<GeoPoint> gpList)

setGeoPoints

public void setGeoPoints(GeoPoint[] gp)

getClientUpload

public boolean getClientUpload()

setClientUpload

public void setClientUpload(boolean v)

isClientUpload

public boolean isClientUpload()

getClientID

public int getClientID()

setClientID

public void setClientID(int v)

getZonePurposeID

public java.lang.String getZonePurposeID()

setZonePurposeID

public void setZonePurposeID(java.lang.String v)

isZonePurposeID

public boolean isZonePurposeID(java.lang.String v)

hasGroupID

public boolean hasGroupID()

getGroupID

public java.lang.String getGroupID()

setGroupID

public void setGroupID(java.lang.String v)

isDeviceInGroup

public boolean isDeviceInGroup(java.lang.String deviceID)
Returns true if the current Geozone is applicable to the specified DeviceID

Parameters:
deviceID - The DeviceID
Returns:
True if the current Geozone is applicable to the specified DeviceID

getFirstGeozoneForDevice

public static Geozone getFirstGeozoneForDevice(Geozone[] gza,
                                               java.lang.String deviceID)
Returns the first Geozone in the specified lizt that is applicable to the specified DeviceID.

Parameters:
gza - The list of Geozones
deviceID - The device id.
Returns:
The first Geozone that is applicable to the specified DeviceID

getGeozoneForDevice

public static Geozone getGeozoneForDevice(java.lang.String acctID,
                                          GeoPoint gp,
                                          java.lang.String devID)
                                   throws DBException
Returns the first (highest priority) Geozone in which the point resides that is also applicable for the specified DeviceID.

Parameters:
acctID - The AccountID
gp - The GeoPoint
devID - The DeviceID
Returns:
The Geozone
Throws:
DBException
Since:
2.4.9-B15

getGeozoneForPurpose

public static Geozone getGeozoneForPurpose(java.lang.String acctID,
                                           GeoPoint gp,
                                           java.lang.String purID)
                                    throws DBException
Returns the first Geozone in which the point resides that is also applicable for the specified Purpose (ie. Geozone type).

Parameters:
acctID - The AccountID
gp - The GeoPoint
purID - The PurposeID
Returns:
The Geozone
Throws:
DBException
Since:
2.5.1-B26

getReverseGeocode

public boolean getReverseGeocode()
Returns true if this instance can be used for reverse-geocoding the location with the Geozone description.


setReverseGeocode

public void setReverseGeocode(boolean v)
Sets whether this instance can be used for reverse-geocoding


isReverseGeocode

public boolean isReverseGeocode(java.lang.String deviceID)
Returns true if this instance can be used for reverse-geocoding the location with the Geozone description.

Parameters:
deviceID - The deviceID to check to see if it is contained within the device group defined in this instance

getArrivalZone

public boolean getArrivalZone()
Returns true if this instance can be used for arrival detection.


setArrivalZone

public void setArrivalZone(boolean v)
Sets whether this instance can be used for arrival detection.


isArrivalZone

public boolean isArrivalZone(java.lang.String deviceID)
Returns true if this instance can be used for arrival detection.

Parameters:
deviceID - The deviceID to check to see if it is contained within the device group defined in this instance

isArrivalZone

@Deprecated
public boolean isArrivalZone()
Deprecated. 

(Deprecated) Returns true if this zone is an arrival-zone


getArrivalStatusCode

public int getArrivalStatusCode()
Gets the status code to use when generating an "Arrive" event.


setArrivalStatusCode

public void setArrivalStatusCode(int v)
Sets the status code to use when generating an "Arrive" event.


getDepartureZone

public boolean getDepartureZone()
Returns true if this instance can be used for departure detection.


setDepartureZone

public void setDepartureZone(boolean v)
Sets whether this instance can be used for departure detection.


isDepartureZone

public boolean isDepartureZone(java.lang.String deviceID)
Returns true if this instance can be used for departure detection.

Parameters:
deviceID - The deviceID to check to see if it is contained within the device group defined in this instance

isDepartureZone

@Deprecated
public boolean isDepartureZone()
Deprecated. 

(Deprecated) Returns true if this zone is an departure-zone


getDepartureStatusCode

public int getDepartureStatusCode()
Gets the status code to use when generating a "Depart" event.


setDepartureStatusCode

public void setDepartureStatusCode(int v)
Sets the status code to use when generating a "Depart" event.


getAutoNotify

public boolean getAutoNotify()
Gets the auto-notification state.


setAutoNotify

public void setAutoNotify(boolean v)
Sets the auto-notification state.


isAutoNotify

public boolean isAutoNotify()
Returns the auto-notification state for this geozone.


getZoomRegion

public boolean getZoomRegion()
Gets the zoom-region state.


setZoomRegion

public void setZoomRegion(boolean v)
Sets the zoom-region state.


isZoomRegion

public boolean isZoomRegion()
Returns the zoom-region state for this geozone.


getStreetAddress

public java.lang.String getStreetAddress()
Gets the street-address for this geozone.


setStreetAddress

public void setStreetAddress(java.lang.String v)
Sets the street-address for this geozone.


getCity

public java.lang.String getCity()
Gets the city-address for this geozone.


setCity

public void setCity(java.lang.String v)
Sets the city-address for this geozone.


getStateProvince

public java.lang.String getStateProvince()
Gets the state/province for this geozone.


setStateProvince

public void setStateProvince(java.lang.String v)
Sets the state/province for this geozone.


getPostalCode

public java.lang.String getPostalCode()
Gets the postal code for this geozone.


setPostalCode

public void setPostalCode(java.lang.String v)
Sets the postal code for this geozone.


getCountry

public java.lang.String getCountry()
Gets the country for this geozone.


setCountry

public void setCountry(java.lang.String v)
Sets the country for this geozone.


getSubdivision

public java.lang.String getSubdivision()
Gets the subdivision-code for this geozone.


setSubdivision

public void setSubdivision(java.lang.String v)
Sets the subdivision-code for this geozone.


getContactPhone

public java.lang.String getContactPhone()
Gets the contact-phone of for this geozone.


setContactPhone

public void setContactPhone(java.lang.String v)
Sets the contact-phone of for this geozone.


supportsCorridor

public static boolean supportsCorridor()
Returns true if this zone supports GeoCorridor information.


getCorridorID

public java.lang.String getCorridorID()
Gets the corridor-id assigned to this geozone.


setCorridorID

public void setCorridorID(java.lang.String v)
Sets the corridor-id assigned to this geozone.


hasCorridorID

public boolean hasCorridorID()
Returns true if a corridor-id has been assigned to this geozone.


getCorrStartSelector

public java.lang.String getCorrStartSelector()

setCorrStartSelector

public void setCorrStartSelector(boolean v)

isCorridorStart

public boolean isCorridorStart(EventData ev)

getCorrEndSelector

public java.lang.String getCorrEndSelector()

setCorrEndSelector

public void setCorrEndSelector(boolean v)

isCorridorEnd

public boolean isCorridorEnd(EventData ev)

setCreationDefaultValues

public void setCreationDefaultValues()
Description copied from class: DBRecord
Override to set default values

Overrides:
setCreationDefaultValues in class DBRecord<Geozone>

IsGeozoneTypeSupported

public static boolean IsGeozoneTypeSupported(int type)

IsGeozoneTypeSupported

public static boolean IsGeozoneTypeSupported(Geozone.GeozoneType type)

containsPoint

public boolean containsPoint(GeoPoint gp)

encodeDMTPZone

public boolean encodeDMTPZone(Payload payload,
                              int ptCnt,
                              boolean hiRes)

setZoneChanged

protected void setZoneChanged()
Sets the zone changed flag


hasBoundingBox

public boolean hasBoundingBox()

getBoundingBox

public static GeoBounds getBoundingBox(Geozone.GeozoneType zoneType,
                                       GeoPoint[] gp,
                                       double radiusM)
Gets the bounding box for the specified zone


getBoundingBox

public GeoBounds getBoundingBox()
Gets the GeoBounds for this Geozone


resetBoundingBox

public boolean resetBoundingBox()
Resets the bounding area for this GeoZone

Returns:
True if the bounding area has changed

insert

public void insert()
            throws DBException
Sets Geozone bounding-box and inserts the GeoZone into the table

Overrides:
insert in class DBRecord<Geozone>
Throws:
DBException - if a database error occurs.

update

public void update(java.lang.String... updFldArray)
            throws DBException
Sets Geozone bounding-box and inserts the GeoZone into the table

Overrides:
update in class DBRecord<Geozone>
Parameters:
updFldArray - An array of fields to update.
Throws:
DBException - if a database error occurs.

update

public void update(java.util.Set<java.lang.String> updFldSet)
            throws DBException
Sets Geozone bounding-box and inserts the GeoZone into the table

Overrides:
update in class DBRecord<Geozone>
Parameters:
updFldSet - A Set of fields to update.
Throws:
DBException - if a database error occurs.

getWhereClause

public static java.lang.String getWhereClause(java.lang.String acctId,
                                              java.lang.String zoneId,
                                              int sortId,
                                              GeoBounds bounds,
                                              GeoPoint centerGP,
                                              boolean activeOnly,
                                              boolean clientUploadOnly,
                                              boolean reverseGeocodeOnly)

getWhereClause

public static java.lang.String getWhereClause(java.lang.String acctId,
                                              long clientId)

exists

public static boolean exists(java.lang.String acctID,
                             java.lang.String zoneID,
                             int sortID)
                      throws DBException
Throws:
DBException

getDescription

public static java.lang.String getDescription(Account account,
                                              GeoPoint gp)

getDescription

public static java.lang.String getDescription(java.lang.String acctID,
                                              GeoPoint gp)

getGeozone

public static Geozone getGeozone(Account account,
                                 java.lang.String zoneID,
                                 GeoPoint gp,
                                 boolean reverseGeocodeOnly)

getGeozone

public static Geozone getGeozone(java.lang.String acctID,
                                 java.lang.String zoneID,
                                 GeoPoint gp,
                                 boolean reverseGeocodeOnly)

getGeozone

public static Geozone getGeozone(java.lang.String acctID,
                                 java.lang.String zoneID,
                                 GeoPoint gp,
                                 java.lang.String purposeID,
                                 boolean reverseGeocodeOnly)

getGeozones

public static Geozone[] getGeozones(java.lang.String acctID,
                                    GeoPoint gp)
                             throws DBException
Throws:
DBException

getGeozones

public static Geozone[] getGeozones(java.lang.String acctID,
                                    GeoBounds gb)
                             throws DBException
Throws:
DBException

getGeozone

public static Geozone[] getGeozone(Account account,
                                   java.lang.String geozoneID)
                            throws DBException
Throws:
DBException

getGeozone

public static Geozone getGeozone(Account account,
                                 java.lang.String geozoneID,
                                 int sortID,
                                 boolean create)
                          throws DBException
Throws:
DBException

containsPoint

public static boolean containsPoint(Account account,
                                    java.lang.String zoneId,
                                    GeoPoint gp)
                             throws DBNotFoundException
Throws:
DBNotFoundException

containsPoint

public static boolean containsPoint(java.lang.String acctId,
                                    java.lang.String zoneId,
                                    GeoPoint gp)
                             throws DBNotFoundException
Throws:
DBNotFoundException

getClientIDZones

public static Geozone[] getClientIDZones(java.lang.String acctId,
                                         long clientId)

getClientUploadZones

public static Geozone[] getClientUploadZones(java.lang.String acctId)

getGeozoneIDsForAccount

public static java.lang.String[] getGeozoneIDsForAccount(java.lang.String acctId)
                                                  throws DBException
Throws:
DBException

getGeozoneIDs

public static java.lang.String[] getGeozoneIDs(DBSelect<Geozone> dsel)
                                        throws DBException
Throws:
DBException

listZones

public static void listZones(java.lang.String acctId,
                             boolean update)

main

public static void main(java.lang.String[] argv)