FromLocation¶
-
public class
FromLocation
extends DatabaseLocation¶ Wrapper for
DatabaseLocation
that is for From 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)
from_city_id¶
-
public long
from_city_id
¶ Mirrors the
Location.cityId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
from_country_id¶
-
public long
from_country_id
¶ Mirrors the
Location.countryId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
from_region_id¶
-
public long
from_region_id
¶ Mirrors the
Location.regionId
inLocation
to avoid collisions in the databaseSee also:
DatabaseLocation
Constructors¶
FromLocation¶
-
public
FromLocation
(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
FromLocation¶
-
public
FromLocation
(JSONObject json)¶ Initializes instance fields by passing JSON to
Location.Location(JSONObject,String,String,String)
and then initializing instance fields usingFromLocation.initialize()
Parameters: - json – JSON object describing the location
Throws: - JSONException – May be thrown in response to improperly formatted JSON
FromLocation¶
-
public
FromLocation
(JSONObject json, boolean distinguisher)¶ Initializes instance fields by passing JSON to
Location.Location(JSONObject)
)} and then initializing instance fields usingFromLocation.initialize()
Parameters: - json – JSON object describing the location
Throws: - JSONException – May be thrown in response to improperly formatted JSON