|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.motorola.iden.udm.PhoneBookEntry
Represents a single Phonebook entry in a UDM Phonebook database.
The PhoneBookEntry class has many different field IDs that it can support. However, each individual PhoneBookEntry object supports only fields valid for its associated list. Its PhoneBook restricts what fields in a PhoneBookEntry are retained. This reflects that some native PhoneBook databases do not support all of the fields available in a PhoneBookEntry element. The methods UDMList.isSupportedField(int) and UDMList.getSupportedTypes(int) can be used to determine if a particular PhoneBookEntry field is supported by a PhoneBook and therefore persisted when the PhoneBookEntry is committed to its list. Attempts to set or get data based on field IDs not supported in the PhoneBookEntry's PhoneBook result in a UDMException.The following are the Field IDs supported within a PhoneBookEntry and their corresponding data type.
Field IDs | Type of Data Associated with Field | Valid Range | |
---|---|---|---|
TEL |
UDMEntry.TYPED_STRING |
A string of characters in "0123456789+pwPW*#". |
|
SPEED_NUM |
UDMEntry.TYPED_STRING |
The valid range is [0, 600] in Falcon phone, and [0, 250] in Condor phone |
SPEED_NUM is not supported on Gemini product. |
PRIV |
UDMEntry.TYPED_STRING |
A string of characters in "0123456789*". Its length does not exceed 18 |
|
REVISION |
UDMEntry.DATE |
No less than 915148800000L |
|
EMAIL |
UDMEntry.STRING |
A valid email address |
|
FORMATTED_NAME |
UDMEntry.STRING |
For Falcon SIM, its length cannot exceed 20 English characters or 10 unicode characters; |
|
GRP |
UDMEntry.STRING |
Its length cannot exceed 3. Its value must be greater than 1 and less than 255 |
|
IP |
UDMEntry.STRING |
A valid IP address |
IP is not supported on Gemini product. |
RINGER |
UDMEntry.INT |
0xff or a positive number that does not exceed 250 |
RINGER is not supported on Gemini product. |
Field Summary | |
static int |
EMAIL
EMAIL Field ID for an e-mail address. |
static int |
FORMATTED_NAME
FORMATTED_NAME Field ID for data corresponding to the name of the PhoneBookEntry. |
static int |
GRP
GRP Field ID for a group dispatch id. |
static int |
IP
IP Field ID for a IP address. |
static int |
NAME_FAMILY
NAME_FAMILY Field ID for the family name of the PhoneBookEntry. |
static int |
NAME_GIVEN
NAME_GIVEN Field ID for the given name of the PhoneBookEntry. |
static int |
NAME_OTHER
NAME_OTHER Field ID for another name for the PhoneBookEntry. |
static int |
NAME_PREFIX
NAME_PREFIX Field ID for a name prefix for the PhoneBookEntry. |
static int |
NAME_SUFFIX
NAME_SUFFIX Field ID for a name suffix for the PhoneBookEntry. |
static int |
NICKNAME
NICKNAME Field ID corresponding to the Nickname of the PhoneBookEntry. |
static int |
PRIV
PRIV Field ID for a private dispatch id. |
static int |
REVISION
REVISION Field ID specifying the last modification time of a PhoneBookEntry. |
static int |
RINGER
RINGER Field ID specifying the ringer of a PhoneBookEntry. |
static int |
SPEED_NUM
SPEED_NUM Field ID for a speed dial number. |
static int |
TEL
TEL Field ID for a telephone number. |
static int |
TYPE_FAX
TYPE_FAX Type "fax" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_HOME
TYPE_HOME Type "home" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_MAIN
TYPE_MAIN Type "main" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_MOBILE
TYPE_MOBILE Type "mobile" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_OTHER
TYPE_OTHER Type "other" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_PAGER
TYPE_PAGER Type "pager" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_PRIVATE
TYPE_PRIVATE Type "private" for PRIV, and VOICE_NAME entries. |
static int |
TYPE_WORK_1
TYPE_WORK_1 Type "work_1" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
TYPE_WORK_2
TYPE_WORK_2 Type "work_2" for TEL, SPEED_NUM, and VOICE_NAME entries. |
static int |
VOICE_NAME
VOICE_NAME Field ID for a voice tag name. |
Fields inherited from interface com.motorola.iden.udm.UDMEntry |
DATE, INT, STRING, TYPED_STRING |
Method Summary | |
void |
commit()
This method commits that data to the underlying data storage for the list. |
int |
getAvailSpeedNum(boolean reverseOrder)
This method returns the next available speed dial number. |
long |
getDate(int fieldID)
Get a Date field from the Element. |
int |
getFieldDataType(int fieldID)
Returns an int representing the data type of the data associated with the given field ID. |
java.lang.String |
getFieldLabel(int fieldID)
Returns a String label associated with the given field ID. |
int[] |
getFields()
Returns all field IDs in the element that have data stored for them. |
int |
getInt(int fieldID)
Get an integer field from the Element. |
java.lang.String |
getString(int fieldID)
Get a String field from the Element. |
java.lang.String |
getTypedString(int fieldID,
int typeID)
Get a String field with a specific type in the element. |
UDMList |
getUDMList()
Returns the UDMList associated with this element. |
boolean |
isModified()
This method returns a boolean indicating whether any of this element's fields have been modified since the element was retrieved or last committed. |
void |
setDate(int fieldID,
long value)
Set a Date field in the Element. |
void |
setInt(int fieldID,
int value)
Set an integer field in the Element. |
void |
setString(int fieldID,
java.lang.String value)
Set a String field in the Element. |
void |
setTypedString(int fieldID,
int typeID,
java.lang.String value)
Set a String field with a specific type ID in the element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EMAIL
public static final int FORMATTED_NAME
public static final int NAME_FAMILY
public static final int NAME_GIVEN
public static final int NAME_OTHER
public static final int NAME_PREFIX
public static final int NAME_SUFFIX
public static final int NICKNAME
public static final int RINGER
public static final int REVISION
public static final int TEL
public static final int PRIV
public static final int GRP
public static final int IP
public static final int SPEED_NUM
public static final int VOICE_NAME
public static final int TYPE_OTHER
public static final int TYPE_PRIVATE
public static final int TYPE_HOME
public static final int TYPE_MOBILE
public static final int TYPE_PAGER
public static final int TYPE_WORK_1
public static final int TYPE_WORK_2
public static final int TYPE_FAX
public static final int TYPE_MAIN
Method Detail |
public UDMList getUDMList()
getUDMList
in interface UDMEntry
public void commit() throws UDMException
commit
in interface UDMEntry
UDMException
- if the commit encounters an error and cannot complete.
java.lang.SecurityException
- if the application has not been granted write access to the UDM list.public boolean isModified()
isModified
in interface UDMEntry
public int getFieldDataType(int fieldID) throws UDMException
getFieldDataType
in interface UDMEntry
fieldID
- The ID of the field for which the data type is being queried.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public java.lang.String getFieldLabel(int fieldID) throws UDMException
getFieldLabel
in interface UDMEntry
java.lang.IllegalArgumentException
- if the field ID is not valid for the implementing class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public int[] getFields()
getFields
in interface UDMEntry
public long getDate(int fieldID) throws UDMException
getDate
in interface UDMEntry
fieldID
- The field ID to get.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public void setDate(int fieldID, long value) throws UDMException
setDate
in interface UDMEntry
fieldID
- The field ID to set.value
- The value to set the field to. Setting a field to 0 has the effect of clearing it.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class or if the
value is outside the range of supported by the native database.
UDMException
- if the field ID is not supported in the implementing instance of the class.public int getInt(int fieldID) throws UDMException
getInt
in interface UDMEntry
fieldID
- The field ID to get.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public void setInt(int fieldID, int value) throws UDMException
setInt
in interface UDMEntry
fieldID
- The field ID to set.value
- The value to set the field to.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class or if the
value is outside the range of supported by the native database.
UDMException
- if the field ID is not supported in the implementing instance of the class.
or the value is invalid for the class.public java.lang.String getString(int fieldID) throws UDMException
getString
in interface UDMEntry
fieldID
- The field ID to get.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public void setString(int fieldID, java.lang.String value) throws UDMException
setString
in interface UDMEntry
fieldID
- The field ID to set.value
- The value to set the field to. Setting a field to null has the effect of clearing it.
java.lang.IllegalArgumentException
- if the field ID is not valid for the derived class or if the
value is outside the range of supported by the native database.
UDMException
- if the field ID is not supported in the implementing instance of the class.
or the value is invalid for the class.public java.lang.String getTypedString(int fieldID, int typeID) throws UDMException
getTypedString
in interface UDMEntry
fieldID
- The field ID to get.typeID
- The specific type for the field to retrieve.
java.lang.IllegalArgumentException
- if the field ID or type ID is not valid for the derived class.
UDMException
- if the field ID is not supported in the implementing instance of the class.public void setTypedString(int fieldID, int typeID, java.lang.String value) throws UDMException
setTypedString
in interface UDMEntry
fieldID
- The field ID to set.typeID
- The type ID for the field.value
- The value to set the field to. Setting a field to null has the effect of clearing it.
java.lang.IllegalArgumentException
- if the field ID or type ID is not valid for the derived class or if the
value is outside the range of supported by the native database.
UDMException
- if the field ID is not supported in the implementing instance of the class.
or the value is invalid for the class.public int getAvailSpeedNum(boolean reverseOrder) throws UDMException
reverseOrder
- Indicates from which direction (lowest or highest) the caller want phonebook to search the DB for an available speed number.
UDMException
- This method throws an exception when there are no more available speed numbers.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |