NearLocation¶
-
public class
NearLocation
extends DatabaseLocation¶ Wrapper for
DatabaseLocation
that is for Near locations. See the documentation forDatabaseLocation
for information as to why this redundancy is necessary. All of these instance fields will be stored in the local cached database.
Fields¶
CITY_ID_KEY¶
-
public static final String
CITY_ID_KEY
¶ Constant that holds the JSON key whose value will be the ID of the city (
City.cityId
) in communications with the server.See also:
Location.Location(JSONObject,String,String,String)
COUNTRY_ID_KEY¶
-
public static final String
COUNTRY_ID_KEY
¶ Constant that holds the JSON key whose value will be the ID of the country (
Country.countryId
) in communications with the server.See also:
Location.Location(JSONObject,String,String,String)
REGION_ID_KEY¶
-
public static final String
REGION_ID_KEY
¶ Constant that holds the JSON key whose value will be the ID of the region (
Region.regionId
) in communications with the server.See also:
Location.Location(JSONObject,String,String,String)
near_city_id¶
-
public long
near_city_id
¶ Mirrors the
Location.cityId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
near_country_id¶
-
public long
near_country_id
¶ Mirrors the
Location.countryId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
near_region_id¶
-
public long
near_region_id
¶ Mirrors the
Location.regionId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
Constructors¶
NearLocation¶
-
public
NearLocation
(long cityId, long regionId, long countryId)¶ Initialize instance fields with provided parameters
Parameters: - cityId – ID of city
- regionId – ID of region
- countryId – ID of country
NearLocation¶
-
public
NearLocation
(JSONObject json)¶ Initializes instance fields by passing JSON to
Location.Location(JSONObject,String,String,String)
and then initializing instance fields usingNearLocation.initialize()
Parameters: - json – JSON object describing the location
Throws: - JSONException – May be thrown in response to improperly formatted JSON
NearLocation¶
-
public
NearLocation
(JSONObject json, boolean distinguisher)¶ Initializes instance fields by passing JSON to
Location.Location(JSONObject)
and then initializing instance fields usingNearLocation.initialize()
Parameters: - json – JSON object describing the location
- distinguisher – Useless value used to distinguish from
NearLocation.NearLocation(JSONObject)
Throws: - JSONException – May be thrown in response to improperly formatted JSON