Java Reference
In-Depth Information
Key
Purpose
Type
START
Date
When the event is scheduled to start
ALARM
int
The relative time for the event's alarm
CLASS
int
Specifies how the event may be accessed, either as
Event.CLASS_CONFIDENTIAL , Event.CLASS_PRIVATE ,or
Event.CLASS_PUBLIC
Table 7-3 shows the accessor field keys for the to-do instances.
Table 7-3. Accessor Field Keys for To-Do Instances
Key
Purpose
Type
NOTE
String
The note for the to-do
SUMMARY
String
A summary of the to-do
UID
String
The unique ID of the to-do
PRIORITY
int
The priority of the to-do from 0 (undefined) to 9,
with 1 being the highest priority
COMPLETION_DATE
Date
When the to-do was completed
DUE
Date
When the to-do must be completed
REVISION
Date
The last time and date at which the to-do was modified
COMPLETED
boolean
Indicates if the to-do was completed
CLASS
int
Specifies how the to-do may be accessed, either as
ToDo.CLASS_CONFIDENTIAL , ToDo.CLASS_PRIVATE ,
or ToDo.CLASS_PUBLIC
So what to do with all these field constants? There's no guarantee that a specific PIM
package implementation will have a specific field in its database, so the first thing to do is
to find out which field a particular implementation of the PIM package actually supports.
You can do this for a particular key by using PIMList.getInstance().isSupportedField or
by obtaining an array of all supported field keys using PIMList.getInstance().
getSupportedFields .
However, to actually read a value in a field, you need to use one of the following
PIMItem accessor methods in conjunction with the field key:
getBinary : Returns the contents of a binary field as a byte [] given its field key and
the index to the n th datum of that type
getDate : Returns the contents of a date field as a Date given its field key and the
index to the n th datum of that type
 
Search WWH ::




Custom Search