public final class MessageItem extends Schema<MessageItem>
This schema is used to create indexes for message items.
It supports index fields attachment, content, senderName,
senderPhone, recipientName, recipientPhone,
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 |
ATTACHMENT |
Indicates the index field name of
attachment. |
static String |
CONTENT |
Indicates the index field name of
content. |
static String |
RECIPIENT_NAME |
Indicates the index field name of
recipientName. |
static String |
RECIPIENT_PHONE |
Indicates the index field name of
recipientPhone. |
static String |
SENDER_NAME |
Indicates the index field name of
senderName. |
static String |
SENDER_PHONE |
Indicates the index field name of
senderPhone. |
| 构造器 | 说明 |
|---|---|
MessageItem() |
A constructor used to create a
MessageItem instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getAttachment() |
Obtains the value of the
attachment index field. |
String |
getContent() |
Obtains the value of the
content index field. |
static List<IndexForm> |
getMessageSchema() |
Obtains a list of index field attributes in this
MessageItem object. |
String |
getRecipientName() |
Obtains the value of the
recipientName index field. |
String |
getRecipientPhone() |
Obtains the value of the
recipientPhone index field. |
String |
getSenderName() |
Obtains the value of the
senderName index field. |
String |
getSenderPhone() |
Obtains the value of the
senderPhone index field. |
MessageItem |
setAttachment(String attachment) |
Sets the
attachment index field. |
MessageItem |
setContent(String content) |
Sets the
content index field. |
MessageItem |
setRecipientName(String recipientName) |
Sets the
recipientName index field. |
MessageItem |
setRecipientPhone(String recipientPhone) |
Sets the
recipientPhone index field. |
MessageItem |
setSenderName(String senderName) |
Sets the
senderName index field. |
MessageItem |
setSenderPhone(String senderPhone) |
Sets the
senderPhone 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 ATTACHMENT
attachment.public static final String CONTENT
content.public static final String RECIPIENT_NAME
recipientName.public static final String RECIPIENT_PHONE
recipientPhone.public static final String SENDER_NAME
senderName.public MessageItem()
MessageItem instance.public static List<IndexForm> getMessageSchema()
MessageItem object.public MessageItem setSenderName(String senderName)
senderName index field.
Attributes of this index field:
IndexForm.indexFieldName = "senderName";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
senderName - Indicates the sender's name.MessageItem object.public MessageItem setSenderPhone(String senderPhone)
senderPhone index field.
Attributes of this index field:
IndexForm.indexFieldName = "senderPhone";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
senderPhone - Indicates the sender's phone number.MessageItem object.public MessageItem setRecipientName(String recipientName)
recipientName index field.
Attributes of this index field:
IndexForm.indexFieldName = "recipientName";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
recipientName - Indicates the recipient's name.MessageItem object.public MessageItem setRecipientPhone(String recipientPhone)
recipientPhone index field.
Attributes of this index field:
IndexForm.indexFieldName = "recipientPhone";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
recipientPhone - Indicates the recipient's phone number.MessageItem object.public MessageItem setContent(String content)
content index field.
Attributes of this index field:
IndexForm.indexFieldName = "content";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
content - Indicates the message content.MessageItem object.public MessageItem setAttachment(String attachment)
attachment index field.
Attributes of this index field:
IndexForm.indexFieldName = "attachment";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = false;
IndexForm.isSearch = true;
attachment - Indicates the message attachment.MessageItem object.public String getSenderName()
senderName index field.senderName index field.public String getSenderPhone()
senderPhone index field.senderPhone index field.public String getRecipientName()
recipientName index field.recipientName index field.public String getRecipientPhone()
recipientPhone index field.recipientPhone index field.public String getContent()
content index field.content index field.public String getAttachment()
attachment index field.attachment index field.