|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.motorola.iden.udm.DateBookEvent
DateBookEvent represents a single Event entry in a UDM DateBook database.
The DateBookEvent class has many different field IDs that it can support. However, each individual DateBookEvent object supports only fields valid for its associated list. Its DateBook restricts what fields in a DateBookEvent are retained. This reflects that some native DateBookEvent databases do not support all of the fields available in a DateBookEvent element. The methods UDMList.isSupportedField(int) and UDMList.getSupportedTypes(int) can be used to determine if a particular DateBookEvent field is supported by a DateBook and therefore persisted when the DateBookEvent is committed to its list. Attempts to set or get data based on field IDs not supported in the DateBookEvent's DateBook result in a UDMException.The following are the Field IDs supported within a DateBookEvent and their corresponding data type.
Field IDs | Type of Data Associated with Field |
---|---|
LOCATION, SUMMARY |
UDMEntry.STRING |
ALARM, END, START |
UDMEntry.DATE |
Field Summary | |
static int |
ALARM
ALARM Field ID specifying the date and time for an Alarm for this Event. |
static int |
END
END Field ID specifying the non-inclusive date and time a single Event ends. |
static int |
LOCATION
LOCATION Field ID identifying the venue for this Event. |
static int |
MIDLET
MIDLET Field ID specifying MIDlet with MIDLET_SUITE that should be launched when the DateBookEvent expires. |
static int |
MIDLET_SUITE
MIDLET_SUITE Field ID specifying MIDlet Suite that should be opened when the DateBookEvent expires. |
static int |
REVISION
REVISION Field ID specifying the last modification date and time of an Event element. |
static int |
RINGER
RINGER Field ID specifying the ringer associated with the DateBookEvent. |
static int |
START
START Field ID specifying the inclusive date and time a single Event starts. |
static int |
STYLE
STYLE Field ID for a style. |
static int |
SUMMARY
SUMMARY Field ID specifying the summary or subject for this Event. |
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. |
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. |
DateBookRepeatEvent |
getRepeat()
Retrieves a DateBookRepeatEvent object specifying how often and when this event occurs. |
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 |
setRepeat(DateBookRepeatEvent value)
Sets the DateBookRepeatEvent specifying how often and when this event occurs. |
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 START
public static final int END
public static final int ALARM
public static final int SUMMARY
public static final int LOCATION
public static final int REVISION
public static final int RINGER
public static final int STYLE
public static final int MIDLET_SUITE
public static final int MIDLET
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.
If the data to be committed is invalid, such as Summary is null, no start time
or end time is specified, alarm is before current time, alarm is for untimed event,
then an UDMException will be thrown.
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 supported by the native database.
END date should be greater than START date. ALARM value shoud be 0-10080 minutes before.
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 or try to set Midlet name before setting Midlet Suite name.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 DateBookRepeatEvent getRepeat()
public void setRepeat(DateBookRepeatEvent value)
value
- An DateBookRepeatEvent describing how often this Event occurs or
null to clear any DateBookRepeatEvent.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |