public final class ContactItem extends Schema<ContactItem>
This schema is used to create indexes for contact items.
It supports index fields phone, email, birthDate,
gender, address, workLocation, 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 |
ADDRESS |
Indicates the index field name of
address. |
static String |
BIRTH_DATE |
Indicates the index field name of
birthDate. |
static String |
EMAIL |
Indicates the index field name of
email. |
static String |
GENDER |
Indicates the index field name of
gender. |
static String |
PHONE |
Indicates the index field name of
phone. |
static String |
WORK_LOCATION |
Indicates the index field name of
workLocation. |
| 构造器 | 说明 |
|---|---|
ContactItem() |
A constructor used to create a
ContactItem instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getAddress() |
Obtains the value of the
address index field. |
Long |
getBirthDate() |
Obtains the value of the
birthDate index field. |
static List<IndexForm> |
getContactSchema() |
Obtains a list of index field attributes in this
ContactItem object. |
String |
getEmail() |
Obtains the value of the
email index field. |
String |
getGender() |
Obtains the value of the
gender index field. |
String |
getPhone() |
Obtains the value of the
phone index field. |
String |
getWorkLocation() |
Obtains the value of the
workLocation index field. |
ContactItem |
setAddress(String address) |
Sets the
address index field. |
ContactItem |
setBirthDate(Long birthDate) |
Sets the
birthDate index field. |
ContactItem |
setEmail(String email) |
Sets the
email index field. |
ContactItem |
setGender(String gender) |
Sets the
gender index field. |
ContactItem |
setPhone(String phone) |
Sets the
phone index field. |
ContactItem |
setWorkLocation(String workLocation) |
Sets the
workLocation 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 ADDRESS
address.public static final String BIRTH_DATE
birthDate.public static final String EMAIL
email.public static final String GENDER
gender.public static final String PHONE
phone.public ContactItem()
ContactItem instance.public static List<IndexForm> getContactSchema()
ContactItem object.public ContactItem setPhone(String phone)
phone index field.
Attributes of this index field:
IndexForm.indexFieldName = "phone";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
phone - Indicates the contact phone number.ContactItem object.public ContactItem setEmail(String email)
email index field.
Attributes of this index field:
IndexForm.indexFieldName = "email";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
email - Indicates the contact email.ContactItem object.public ContactItem setBirthDate(Long birthDate)
birthDate index field.
Attributes of this index field:
IndexForm.indexFieldName = "birthDate";
IndexForm.indexType = IndexType.LONG;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
birthDate - Indicates the contact birth date.ContactItem object.public ContactItem setGender(String gender)
gender index field.
Attributes of this index field:
IndexForm.indexFieldName = "gender";
IndexForm.indexType = IndexType.SORTED_NO_ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
gender - Indicates the contact gender.ContactItem object.public ContactItem setAddress(String address)
address index field.
Attributes of this index field:
IndexForm.indexFieldName = "address";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
address - Indicates the contact address.ContactItem object.public ContactItem setWorkLocation(String workLocation)
workLocation index field.
Attributes of this index field:
IndexForm.indexFieldName = "workLocation";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
workLocation - Indicates the contact work location.ContactItem object.public String getPhone()
phone index field.phone index field.public String getEmail()
email index field.email index field.public Long getBirthDate()
birthDate index field.birthDate index field.public String getGender()
gender index field.gender index field.public String getAddress()
address index field.address index field.public String getWorkLocation()
workLocation index field.workLocation index field.