public final class PlaceItem extends Schema<PlaceItem>
This schema is used to create indexes for place items. It supports index fields
longitude, latitude, country, province, city,
district, road, postalCode, and all the fields in CommonItem.
Among these fields, identifier is mandatory and can be set via the
CommonItem#setIdentifier(String) method.
SystemCapability.Data#DATA_SEARCH| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static String |
CITY |
Indicates the index field name of
city. |
static String |
COUNTRY |
Indicates the index field name of
country. |
static String |
DISTRICT |
Indicates the index field name of
district. |
static String |
LATITUDE |
Indicates the index field name of
latitude. |
static String |
LONGITUDE |
Indicates the index field name of
longitude. |
static String |
POSTAL_CODE |
Indicates the index field name of
postalCode. |
static String |
PROVINCE |
Indicates the index field name of
province. |
static String |
ROAD |
Indicates the index field name of
road. |
| 构造器 | 说明 |
|---|---|
PlaceItem() |
A constructor used to create a
PlaceItem instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getCity() |
Obtains the value of the
city index field. |
String |
getCountry() |
Obtains the value of the
country index field. |
String |
getDistrict() |
Obtains the value of the
district index field. |
Double |
getLatitude() |
Obtains the value of the
latitude index field. |
Double |
getLongitude() |
Obtains the value of the
longitude index field. |
static List<IndexForm> |
getPlaceSchema() |
Obtains a list of index field attributes in this
PlaceItem object. |
Long |
getPostalCode() |
Obtains the value of the
postalCode index field. |
String |
getProvince() |
Obtains the value of the
province index field. |
String |
getRoad() |
Obtains the value of the
road index field. |
PlaceItem |
setCity(String city) |
Sets the
city index field. |
PlaceItem |
setCountry(String country) |
Sets the
country index field. |
PlaceItem |
setDistrict(String district) |
Sets the
district index field. |
PlaceItem |
setLatitude(Double latitude) |
Sets the
latitude index field. |
PlaceItem |
setLongitude(Double longitude) |
Sets the
longitude index field. |
PlaceItem |
setPostalCode(Long postalCode) |
Sets the
postalCode index field. |
PlaceItem |
setProvince(String province) |
Sets the
province index field. |
PlaceItem |
setRoad(String road) |
Sets the
road index field. |
clear, get, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsString, getValues, isEmpty, put, put, put, put, put, remove, setValues, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlternateName, getCategory, getDateCreate, getDescription, getIdentifier, getKeywords, getName, getPotentialAction, getReserved1, getReserved2, getSubtitle, getThumbnailUrl, getTitle, getUrl, setAlternateName, setCategory, setDateCreate, setDescription, setIdentifier, setKeywords, setName, setPotentialAction, setReserved1, setReserved2, setSubtitle, setThumbnailUrl, setTitle, setUrlpublic static final String COUNTRY
country.public static final String DISTRICT
district.public static final String LATITUDE
latitude.public static final String LONGITUDE
longitude.public static final String POSTAL_CODE
postalCode.public static final String PROVINCE
province.public static List<IndexForm> getPlaceSchema()
PlaceItem object.public PlaceItem setLatitude(Double latitude)
latitude index field.
Attributes of this index field:
IndexForm.indexFieldName = "latitude";
IndexForm.indexType = IndexType.DOUBLE;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
latitude - Indicates the latitude to set.PlaceItem object.public PlaceItem setLongitude(Double longitude)
longitude index field.
Attributes of this index field:
IndexForm.indexFieldName = "longitude";
IndexForm.indexType = IndexType.DOUBLE;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
longitude - Indicates the longitude to set.PlaceItem object.public PlaceItem setCountry(String country)
country index field.
Attributes of this index field:
IndexForm.indexFieldName = "country";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
country - Indicates the country/region to set.PlaceItem object.public PlaceItem setProvince(String province)
province index field.
Attributes of this index field:
IndexForm.indexFieldName = "province";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
province - Indicates the first-level administrative division
(such as a province or state) to set.PlaceItem object.public PlaceItem setCity(String city)
city index field.
Attributes of this index field:
IndexForm.indexFieldName = "city";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
city - Indicates the city to set.PlaceItem object.public PlaceItem setDistrict(String district)
district index field.
Attributes of this index field:
IndexForm.indexFieldName = "district";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
district - Indicates the city district to set.PlaceItem object.public PlaceItem setRoad(String road)
road index field.
Attributes of this index field:
IndexForm.indexFieldName = "road";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
road - Indicates the road to set.PlaceItem object.public PlaceItem setPostalCode(Long postalCode)
postalCode index field.
Attributes of this index field:
IndexForm.indexFieldName = "postalCode";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
postalCode - Indicates the postal code to set.PlaceItem object.public Double getLatitude()
latitude index field.latitude index field.public Double getLongitude()
longitude index field.longitude index field.public Long getPostalCode()
postalCode index field.postalCode index field.public String getCountry()
country index field.country index field.public String getProvince()
province index field.province index field.public String getCity()
city index field.city index field.public String getDistrict()
district index field.district index field.public String getRoad()
road index field.road index field.