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_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_corrEndSelector
           
static java.lang.String FLD_corridorID
           
static java.lang.String FLD_corrStartSelector
           
static java.lang.String FLD_country
           
static java.lang.String FLD_departureZone
           
static java.lang.String FLD_geozoneID
           
static java.lang.String FLD_groupID
           
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_zonePurposeID
           
static java.lang.String FLD_zoneType
           
static java.lang.String FLD_zoomRegion
           
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_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)
           
 boolean getArrivalZone()
           
 boolean getAutoNotify()
           
 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()
           
 int getClientID()
           
static Geozone[] getClientIDZones(java.lang.String acctId, long clientId)
           
 boolean getClientUpload()
           
static Geozone[] getClientUploadZones(java.lang.String acctId)
           
 java.lang.String getCorrEndSelector()
           
 java.lang.String getCorridorID()
           
 java.lang.String getCorrStartSelector()
           
 java.lang.String getCountry()
           
 boolean getDepartureZone()
           
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()
           
 GeoPoint getGeoPoint(int ndx)
           
 GeoPoint getGeoPoint(int ndx, GeoPoint dft)
           
 GeoPoint getGeoPoint1()
           
 GeoPoint getGeoPoint2()
           
 GeoPoint getGeoPoint3()
           
 GeoPoint getGeoPoint4()
           
 GeoPoint getGeoPoint5()
           
 GeoPoint getGeoPoint6()
           
 GeoPoint getGeoPoint7()
           
 GeoPoint getGeoPoint8()
           
static int GetGeoPointCount()
           
 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)
           
 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()
           
 double getLatitude(int ndx)
           
 double getLatitude1()
           
 double getLatitude2()
           
 double getLatitude3()
           
 double getLatitude4()
           
 double getLatitude5()
           
 double getLatitude6()
           
 double getLatitude7()
           
 double getLatitude8()
           
 double getLongitude(int ndx)
           
 double getLongitude1()
           
 double getLongitude2()
           
 double getLongitude3()
           
 double getLongitude4()
           
 double getLongitude5()
           
 double getLongitude6()
           
 double getLongitude7()
           
 double getLongitude8()
           
 double getMaxLatitude()
          Gets the geozone bounding maximum latitude
 double getMaxLongitude()
          Gets the geozone bounding maximum longitude
 double getMinLatitude()
          Gets the geozone bounding minimum latitude
 double getMinLongitude()
          Gets the geozone bounding minimum longitude
 double getNorthLatitude()
           
 java.lang.String getPostalCode()
           
 int getPriority()
          Gets the geozone priority
 int getRadius()
           
 double getRadiusKilometers()
           
 double getRadiusMeters()
           
 double getRadiusMeters(double minValue, double maxValue)
           
 boolean getReverseGeocode()
           
 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()
           
 java.lang.String getStreetAddress()
           
 java.lang.String getSubdivision()
           
static java.lang.String getTableDescription(java.util.Locale loc)
          Gets this table description
 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 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()
           
 boolean hasBoundingBox()
           
 boolean hasCorridorID()
           
 boolean hasGroupID()
           
 boolean hasRadius()
           
 void insert()
          Sets Geozone bounding-box and inserts the GeoZone into the table
 boolean isArrivalZone(java.lang.String deviceID)
           
 boolean isAutoNotify()
           
 boolean isClientUpload()
           
 boolean isCorridorEnd(EventData ev)
           
 boolean isCorridorStart(EventData ev)
           
 boolean isDepartureZone(java.lang.String deviceID)
           
 boolean isDeviceInGroup(java.lang.String deviceID)
           
static boolean IsGeozoneTypeSupported(Geozone.GeozoneType type)
           
static boolean IsGeozoneTypeSupported(int type)
           
 boolean isReverseGeocode(java.lang.String deviceID)
           
 boolean isZoomRegion()
           
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 setArrivalZone(boolean v)
           
 void setAutoNotify(boolean v)
           
 void setCity(java.lang.String v)
           
 void setClientID(int v)
           
 void setClientUpload(boolean v)
           
 void setCorrEndSelector(boolean v)
           
 void setCorridorID(java.lang.String v)
           
 void setCorrStartSelector(boolean v)
           
 void setCountry(java.lang.String v)
           
 void setCreationDefaultValues()
          Override to set default values
 void setDefaultRadius()
           
 void setDepartureZone(boolean v)
           
 void setGeoPoint(int ndx, double lat, double lon)
           
 void setGeoPoint(int ndx, GeoPoint gp)
           
 void setGeoPoint1(GeoPoint gp)
           
 void setGeoPoint2(GeoPoint gp)
           
 void setGeoPoint3(GeoPoint gp)
           
 void setGeoPoint4(GeoPoint gp)
           
 void setGeoPoint5(GeoPoint gp)
           
 void setGeoPoint6(GeoPoint gp)
           
 void setGeoPoint7(GeoPoint gp)
           
 void setGeoPoint8(GeoPoint gp)
           
 void setGeoPoints(GeoPoint[] gp)
           
 void setGeozoneID(java.lang.String v)
          Sets the geozoneID key
 void setGroupID(java.lang.String v)
           
 void setLatitude(int ndx, double 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 setLongitude(int ndx, 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)
           
 void setPriority(int v)
          Sets the geozone priority
 void setRadius(int v)
           
 void setReverseGeocode(boolean v)
           
 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)
           
 void setStreetAddress(java.lang.String v)
           
 void setSubdivision(java.lang.String v)
           
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)
           
static boolean supportsCorridor()
           
static boolean supportsPriority()
          Returns true if this table supports 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, getIsActive, getNotes, 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, appendFieldValues, clearChanged, clearError, clearExcludedUpdateFields, clearLastCaughtSQLException, equals, excludeFieldFromUpdate, excludeFieldFromUpdate, fireChangeNotification, getCreationDateTime, getCreationMillis, getCreationTime, GetCurrentUser, getDefaultFieldValueKey, getDescription, getErrorDescription, getFactory, getFactory, getField, getFieldBoolean, getFieldDateTime, getFieldDouble, getFieldFloat, getFieldInt, getFieldLong, getFieldName, getFieldString, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getLastCaughtSQLException, 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, isLastCaughtSQLExceptionErrorCode, isOkToReload, isOkToSave, isValidating, isVirtual, lock, lockRead, lockWrite, newField_creationMillis, newField_creationTime, newField_creationTime, newField_description, newField_description, 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, SetCurrentUser, setDescription, setError, setError, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setIgnoreInvalidFields, setLastCaughtSQLException, 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

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_departureZone

public static final java.lang.String FLD_departureZone
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_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_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_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

getGeozoneType

public static Geozone.GeozoneType getGeozoneType(Geozone z)

getGeozoneType

public static Geozone.GeozoneType getGeozoneType(int zt)

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 priority


getPriority

public int getPriority()
Gets the geozone priority


setPriority

public void setPriority(int v)
Sets the geozone 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)

getNorthLatitude

public double getNorthLatitude()

getSouthLatitude

public double getSouthLatitude()

getWestLongitude

public double getWestLongitude()

getEastLongitude

public double getEastLongitude()

getLatitude1

public double getLatitude1()

setLatitude1

public void setLatitude1(double v)

getLongitude1

public double getLongitude1()

setLongitude1

public void setLongitude1(double v)

getGeoPoint1

public GeoPoint getGeoPoint1()

setGeoPoint1

public void setGeoPoint1(GeoPoint gp)

getLatitude2

public double getLatitude2()

setLatitude2

public void setLatitude2(double v)

getLongitude2

public double getLongitude2()

setLongitude2

public void setLongitude2(double v)

getGeoPoint2

public GeoPoint getGeoPoint2()

setGeoPoint2

public void setGeoPoint2(GeoPoint gp)

getLatitude3

public double getLatitude3()

setLatitude3

public void setLatitude3(double v)

getLongitude3

public double getLongitude3()

setLongitude3

public void setLongitude3(double v)

getGeoPoint3

public GeoPoint getGeoPoint3()

setGeoPoint3

public void setGeoPoint3(GeoPoint gp)

getLatitude4

public double getLatitude4()

setLatitude4

public void setLatitude4(double v)

getLongitude4

public double getLongitude4()

setLongitude4

public void setLongitude4(double v)

getGeoPoint4

public GeoPoint getGeoPoint4()

setGeoPoint4

public void setGeoPoint4(GeoPoint gp)

getLatitude5

public double getLatitude5()

setLatitude5

public void setLatitude5(double v)

getLongitude5

public double getLongitude5()

setLongitude5

public void setLongitude5(double v)

getGeoPoint5

public GeoPoint getGeoPoint5()

setGeoPoint5

public void setGeoPoint5(GeoPoint gp)

getLatitude6

public double getLatitude6()

setLatitude6

public void setLatitude6(double v)

getLongitude6

public double getLongitude6()

setLongitude6

public void setLongitude6(double v)

getGeoPoint6

public GeoPoint getGeoPoint6()

setGeoPoint6

public void setGeoPoint6(GeoPoint gp)

getLatitude7

public double getLatitude7()

setLatitude7

public void setLatitude7(double v)

getLongitude7

public double getLongitude7()

setLongitude7

public void setLongitude7(double v)

getGeoPoint7

public GeoPoint getGeoPoint7()

setGeoPoint7

public void setGeoPoint7(GeoPoint gp)

getLatitude8

public double getLatitude8()

setLatitude8

public void setLatitude8(double v)

getLongitude8

public double getLongitude8()

setLongitude8

public void setLongitude8(double v)

getGeoPoint8

public GeoPoint getGeoPoint8()

setGeoPoint8

public void setGeoPoint8(GeoPoint gp)

GetGeoPointCount

public static int GetGeoPointCount()

getLatitude

public double getLatitude(int ndx)

setLatitude

public void setLatitude(int ndx,
                        double v)

getLongitude

public double getLongitude(int ndx)

setLongitude

public void setLongitude(int ndx,
                         double v)

getGeoPoint

public GeoPoint getGeoPoint(int ndx)

getGeoPoint

public GeoPoint getGeoPoint(int ndx,
                            GeoPoint dft)

getGeoPoints

public GeoPoint[] getGeoPoints()

setGeoPoint

public void setGeoPoint(int ndx,
                        GeoPoint gp)

setGeoPoint

public void setGeoPoint(int ndx,
                        double lat,
                        double lon)

setGeoPoints

public void setGeoPoints(GeoPoint[] gp)

clearGeoPoints

public void clearGeoPoints()

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)

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)

getReverseGeocode

public boolean getReverseGeocode()

setReverseGeocode

public void setReverseGeocode(boolean v)

isReverseGeocode

public boolean isReverseGeocode(java.lang.String deviceID)

getArrivalZone

public boolean getArrivalZone()

setArrivalZone

public void setArrivalZone(boolean v)

isArrivalZone

public boolean isArrivalZone(java.lang.String deviceID)

getDepartureZone

public boolean getDepartureZone()

setDepartureZone

public void setDepartureZone(boolean v)

isDepartureZone

public boolean isDepartureZone(java.lang.String deviceID)

getAutoNotify

public boolean getAutoNotify()

setAutoNotify

public void setAutoNotify(boolean v)

isAutoNotify

public boolean isAutoNotify()

getZoomRegion

public boolean getZoomRegion()

setZoomRegion

public void setZoomRegion(boolean v)

isZoomRegion

public boolean isZoomRegion()

getStreetAddress

public java.lang.String getStreetAddress()

setStreetAddress

public void setStreetAddress(java.lang.String v)

getCity

public java.lang.String getCity()

setCity

public void setCity(java.lang.String v)

getStateProvince

public java.lang.String getStateProvince()

setStateProvince

public void setStateProvince(java.lang.String v)

getPostalCode

public java.lang.String getPostalCode()

setPostalCode

public void setPostalCode(java.lang.String v)

getCountry

public java.lang.String getCountry()

setCountry

public void setCountry(java.lang.String v)

getSubdivision

public java.lang.String getSubdivision()

setSubdivision

public void setSubdivision(java.lang.String v)

supportsCorridor

public static boolean supportsCorridor()

getCorridorID

public java.lang.String getCorridorID()

setCorridorID

public void setCorridorID(java.lang.String v)

hasCorridorID

public boolean hasCorridorID()

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 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)

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)