|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.datatypes.BaseDataType com.vodafone360.people.datatypes.Contact
public class Contact
BaseDataType encapsulating a Contact retrieved from, or sent to, Now+ server.
Represents a contact in the people client database with all the associated information. Information stored in a contact is fetched from multiple sub-tables. For example a contact is made up of multiple details which are fetched from the contact details table.
The lighter weight ContactSummary
object should be used if only the
contact name and essential details are needed.
Nested Class Summary | |
---|---|
private static class |
Contact.MemberData
Member data definitions used when reading and writing Contact from/to Parcels. |
private static class |
Contact.Tags
Tags for fields associated with Contact items. |
Nested classes/interfaces inherited from interface com.vodafone360.people.database.persistenceHelper.Persistable |
---|
Persistable.Column, Persistable.Entity, Persistable.Id, Persistable.Table |
Field Summary | |
---|---|
java.lang.String |
aboutMe
Contains the about me string provided by the server |
java.lang.Long |
contactID
The server ID (or null if the contact has not yet been synchronised) |
java.lang.Boolean |
deleted
Contains true if the contact has been deleted on the server |
java.util.List<ContactDetail> |
details
A list of contact details (this contains the main information stored in the contact such as name, phone number, email, etc.) |
java.lang.Boolean |
friendOfMine
Contains true if the contacts is marked as a friend |
java.lang.Integer |
gender
The gender of the contact received from the server |
java.util.List<java.lang.Long> |
groupList
A list groups (server IDs) which the contact is a member of |
java.lang.Long |
localContactID
Primary key in the database |
java.lang.Integer |
nativeContactId
Internal value which is used to store the primary key of the contact stored in the native Android addressbook. |
java.lang.String |
profilePath
The path of the contact thumbnail/avatar on the server |
java.util.List<java.lang.String> |
sources
A list of sources which has been fetched from the sources sub-table |
java.lang.Boolean |
synctophone
Set to true if this contact should be synchronised with the native address book. |
java.lang.Long |
updated
The timestamp when the contact was last updated on the server |
java.lang.Long |
userID
The user ID if the contact has been sychronised with the server and the contact is associated with a user |
Constructor Summary | |
---|---|
Contact()
|
Method Summary | |
---|---|
void |
copy(UserProfile source)
Copy parameters from UserProfile object. |
static Contact |
createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
Create Contact item from Hashtable generated by Hessian-decoder |
java.util.Hashtable<java.lang.String,java.lang.Object> |
createHashtable()
Create Hashtable representing Contact parameters. |
int |
describeContents()
|
private Contact.Tags |
findTag(java.lang.String tag)
Find Tags item for specified String |
ContactDetail |
getContactDetail(ContactDetail.DetailKeys detailKey)
Fetches the preffered ContactDetail for this Contact for example the preffered phone number or email address If no such is found, an unpreffered contact will be taken |
java.lang.String |
getDetailString()
|
private ContactDetail |
getPrefferedContactDetail(ContactDetail.DetailKeys detailKey)
Fetches the preffered ContactDetail for this Contact and a DetailKey for example the preffered phone number or email address |
java.lang.String |
name()
Return name of the current Data-type. |
void |
readFromParcel(Parcel in)
Read Contact from Parcel. |
private void |
setValue(Contact.Tags tag,
java.lang.Object value)
Sets the value of the member data item associated with the specified tag. |
java.lang.String |
toString()
|
void |
writeToParcel(Parcel dest,
int flags)
Note: only called from tests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.Long localContactID
public java.lang.String aboutMe
public java.lang.Long contactID
public java.lang.Long userID
public java.util.List<java.lang.String> sources
public java.lang.Long updated
public java.lang.String profilePath
public java.lang.Integer gender
public java.lang.Boolean friendOfMine
public java.lang.Boolean deleted
public java.lang.Integer nativeContactId
public final java.util.List<ContactDetail> details
public java.util.List<java.lang.Long> groupList
public java.lang.Boolean synctophone
Also determines which contacts are shown in the phonebook group in the UI.
Constructor Detail |
---|
public Contact()
Method Detail |
---|
private Contact.Tags findTag(java.lang.String tag)
tag
- String value to find Tags item for
public java.lang.String name()
name
in class BaseDataType
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Hashtable<java.lang.String,java.lang.Object> createHashtable()
public static Contact createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
hash
- Hashtable containing Contact parameters
private void setValue(Contact.Tags tag, java.lang.Object value)
tag
- Current tagval
- Value associated with the tagpublic void copy(UserProfile source)
source
- UserProfile object to populate Contact with.public void readFromParcel(Parcel in)
in
- Parcel containing Contact item.public int describeContents()
public void writeToParcel(Parcel dest, int flags)
public ContactDetail getContactDetail(ContactDetail.DetailKeys detailKey)
detailKey
- The type of the Detail (PHONE, EMAIL_ADDRESS)
private ContactDetail getPrefferedContactDetail(ContactDetail.DetailKeys detailKey)
detailKey
- The type of the Detail (PHONE, EMAIL_ADDRESS)
public java.lang.String getDetailString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc