public static final class ContactsContract.Contacts.Entity extends Object implements BaseColumns, ContactsContract.ContactsColumns, ContactsContract.ContactNameColumns, ContactsContract.RawContactsColumns, ContactsContract.BaseSyncColumns, ContactsContract.SyncColumns, ContactsContract.DataColumns, ContactsContract.StatusColumns, ContactsContract.ContactOptionsColumns, ContactsContract.ContactStatusColumns
A sub-directory of a contact that contains all of its
ContactsContract.RawContacts
as well as
ContactsContract.Data
rows. To access this directory append
CONTENT_DIRECTORY
to the contact URI.
Entity has three ID fields: ContactsContract.RawContactsColumns.CONTACT_ID
for the contact,
RAW_CONTACT_ID
for the raw contact and DATA_ID
for
the data rows. Entity always contains at least one row per
constituent raw contact, even if there are no actual data rows. In
this case the DATA_ID
field will be null.
Entity reads all data for the entire contact in one transaction, to guarantee consistency. There is significant data duplication in the Entity (each row repeats all Contact columns and all RawContact columns), so the benefits of transactional consistency should be weighed against the cost of transferring large amounts of denormalized data from the Provider.
To reduce the amount of data duplication the contacts provider and directory providers implementing this protocol are allowed to provide common Contacts and RawContacts fields in the first row returned for each raw contact only and leave them as null in subsequent rows.
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_DIRECTORY
The directory twig for this sub-table
|
static String |
DATA_ID
The ID of the data row.
|
static String |
RAW_CONTACT_ID
The ID of the raw contact row.
|
_COUNT, _ID
DISPLAY_NAME, HAS_PHONE_NUMBER, IN_VISIBLE_GROUP, IS_USER_PROFILE, LOOKUP_KEY, NAME_RAW_CONTACT_ID, PHOTO_FILE_ID, PHOTO_ID, PHOTO_THUMBNAIL_URI, PHOTO_URI
DISPLAY_NAME_ALTERNATIVE, DISPLAY_NAME_PRIMARY, DISPLAY_NAME_SOURCE, PHONETIC_NAME, PHONETIC_NAME_STYLE, SORT_KEY_ALTERNATIVE, SORT_KEY_PRIMARY
ACCOUNT_TYPE_AND_DATA_SET, AGGREGATION_MODE, CONTACT_ID, DATA_SET, DELETED, NAME_VERIFIED, RAW_CONTACT_IS_READ_ONLY, RAW_CONTACT_IS_USER_PROFILE
ACCOUNT_NAME, ACCOUNT_TYPE, DIRTY, SOURCE_ID, VERSION
SYNC1, SYNC2, SYNC3, SYNC4
DATA_VERSION, DATA1, DATA10, DATA11, DATA12, DATA13, DATA14, DATA15, DATA2, DATA3, DATA4, DATA5, DATA6, DATA7, DATA8, DATA9, IS_PRIMARY, IS_READ_ONLY, IS_SUPER_PRIMARY, MIMETYPE, RES_PACKAGE, SYNC1, SYNC2, SYNC3, SYNC4
AVAILABLE, AWAY, CAPABILITY_HAS_CAMERA, CAPABILITY_HAS_VIDEO, CAPABILITY_HAS_VOICE, CHAT_CAPABILITY, DO_NOT_DISTURB, IDLE, INVISIBLE, OFFLINE, PRESENCE, PRESENCE_CUSTOM_STATUS, PRESENCE_STATUS, STATUS, STATUS_ICON, STATUS_LABEL, STATUS_RES_PACKAGE, STATUS_TIMESTAMP
CUSTOM_RINGTONE, LAST_TIME_CONTACTED, SEND_TO_VOICEMAIL, STARRED, TIMES_CONTACTED
CONTACT_CHAT_CAPABILITY, CONTACT_PRESENCE, CONTACT_STATUS, CONTACT_STATUS_ICON, CONTACT_STATUS_LABEL, CONTACT_STATUS_RES_PACKAGE, CONTACT_STATUS_TIMESTAMP
public static final String CONTENT_DIRECTORY
public static final String RAW_CONTACT_ID
Type: INTEGER
public static final String DATA_ID
Type: INTEGER