public final class EventItem extends Schema<EventItem>
This schema is used to create indexes for event items.
It supports index fields startDate, endDate, location,
longitude, latitude, 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 |
END_DATE |
Indicates the index field name of
endDate. |
static String |
LATITUDE |
Indicates the index field name of
latitude. |
static String |
LOCATION |
Indicates the index field name of
location. |
static String |
LONGITUDE |
Indicates the index field name of
longitude. |
static String |
START_DATE |
Indicates the index field name of
startDate. |
| 构造器 | 说明 |
|---|---|
EventItem() |
A constructor used to create an
EventItem instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Long |
getEndDate() |
Obtains the value of the
endDate index field. |
static List<IndexForm> |
getEventSchema() |
Obtains a list of index field attributes in this
EventItem object. |
Double |
getLatitude() |
Obtains the value of the
latitude index field. |
String |
getLocation() |
Obtains the value of the
location index field. |
Double |
getLongitude() |
Obtains the value of the
longitude index field. |
Long |
getStartDate() |
Obtains the value of the
startDate index field. |
EventItem |
setEndDate(Long endDate) |
Sets the
endDate index field. |
EventItem |
setLatitude(Double latitude) |
Sets the
latitude index field. |
EventItem |
setLocation(String location) |
Sets the
location index field. |
EventItem |
setLongitude(Double longitude) |
Sets the
longitude index field. |
EventItem |
setStartDate(Long startDate) |
Sets the
startDate 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 END_DATE
endDate.public static final String LATITUDE
latitude.public static final String LOCATION
location.public static final String LONGITUDE
longitude.public EventItem()
EventItem instance.public static List<IndexForm> getEventSchema()
EventItem object.public EventItem setStartDate(Long startDate)
startDate index field.
Attributes of this index field:
IndexForm.indexFieldName = "startDate";
IndexForm.indexType = IndexType.LONG;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
startDate - Indicates the event start date.EventItem object.public EventItem setEndDate(Long endDate)
endDate index field.
Attributes of this index field:
IndexForm.indexFieldName = "endDate";
IndexForm.indexType = IndexType.LONG;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
endDate - Indicates the event end date.EventItem object.public EventItem setLocation(String location)
location index field.
Attributes of this index field:
IndexForm.indexFieldName = "location";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
location - Indicates the event location.EventItem object.public EventItem 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 of the event location.EventItem object.public EventItem 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 of the event location.EventItem object.public Long getStartDate()
startDate index field.startDate index field.public Long getEndDate()
endDate index field.endDate index field.public String getLocation()
location index field.location index field.public Double getLongitude()
longitude index field.longitude index field.public Double getLatitude()
latitude index field.latitude index field.