javax.microedition.pim
Interface ContactList

All Superinterfaces:
PIMList
All Known Subinterfaces:
BlackBerryContactList

public interface ContactList
extends PIMList

Represents a list of PIM contacts. A ContactList contains Contact objects.

The PIMList.isSupportedField(int) is invoked to determine if a field (as specified by the integer argument) is supported by a ContactList. Similarly, the PIMList.getSupportedAttributes(int) method is invoked to return an integer array representing all fields supported by the list.

For more information about this class or about the personal information management (PIM) API, refer to The PDA Profile specification (JSR-000075) for the J2ME(TM) Platform.

Since:
JDE 4.0.0
See Also:
Contact, PIMItem

Field Summary
 
Fields inherited from interface javax.microedition.pim.PIMList
UNCATEGORIZED
 
Method Summary
 Contact createContact()
          Creates a new Contact instance.
 Contact importContact(Contact element)
          Imports a Contact into the list using a given, predefined Contact object.
 void removeContact(Contact element)
          Removes a Contact from the list.
 
Methods inherited from interface javax.microedition.pim.PIMList
addCategory, close, deleteCategory, getArrayElementLabel, getAttributeLabel, getCategories, getFieldDataType, getFieldLabel, getName, getSupportedArrayElements, getSupportedAttributes, getSupportedFields, isCategory, isSupportedArrayElement, isSupportedAttribute, isSupportedField, items, items, items, itemsByCategory, maxCategories, maxValues, renameCategory, stringArraySize
 

Method Detail

createContact

public Contact createContact()
Creates a new Contact instance.

The new Contact object is created initially empty and contains empty fields for all attributes that are supported by the list.

The Contact object is not added to the ContactList upon creation. The method PIMItem.commit() must be invoked in order to add the Contact to the list.

Returns:
Returns a new Contact instance.
Since:
JDE 4.0.0

importContact

public Contact importContact(Contact element)
Imports a Contact into the list using a given, predefined Contact object.

The Contact is created using as much of the existing information as possible. If a field in the existing Contact object is not supported by the ContactList, the field is not included in the Contact. If the specified Contact is already in the list, a new Contact is created with similar information.

The Contact object is not added to the ContactList upon creation. The method PIMItem.commit() must be invoked in order to add the Contact to the list.

Parameters:
element - The Contact object to use to import data into the new contact.
Returns:
The Contact object to add to the list.
Since:
JDE 4.0.0

removeContact

public void removeContact(Contact element)
                   throws PIMException
Removes a Contact from the list.

Parameters:
element - The Contact to be removed from the list.
Throws:
PIMException - Thrown if an error occurs, or if the Contact cannot be found in the list.
Since:
JDE 4.0.0



Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.