|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.motorola.iden.udm.DateBookRepeatEvent
Represents a description for a repeating pattern for an Event element. The fields are a subset of the capabilities of the RRULE field in VEVENT defined by the vCalendar 1.0 specification from the Internet Mail Consortium (http://www.imc.org). It is used on an Event to determine how often the Event occurs.
The following table shows the valid values for the fields that can be set in DateBookRepeatEvent:
Field IDs | Set Method | Valid Values |
---|---|---|
COUNT |
setInt |
any positive int |
FREQUENCY |
setInt |
DAILY, WEEKLY, MONTHLY, YEARLY |
INTERVAL |
setInt |
any positive int |
END |
setDate |
any valid Date |
MONTH_IN_YEAR |
setInt |
JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST,
SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER |
DAY_IN_WEEK |
setInt |
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY |
WEEK_IN_MONTH |
setInt |
FIRST, SECOND, THIRD, FOURTH, FIFTH, LAST, SECONDLAST,
THIRDLAST, FOURTHLAST, FIFTHLAST |
DAY_IN_MONTH |
setInt |
1-31 |
DAY_IN_YEAR |
setInt |
1-366 |
The following examples demonstrate some possible repeat values.
To specify the associated event occurs every day: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.DAILY);
To specify the associated event occurs every day for the next five days: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.DAILY);
setInt(DateBookRepeatEvent.COUNT, 5);
To specify this event occurs every week on Monday and Tuesday: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.WEEKLY);
setInt(DateBookRepeatEvent.DAY_IN_WEEK, DateBookRepeatEvent.MONDAY | DateBookRepeatEvent.TUESDAY);
To specify the associated event occurs every third week on Friday: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.WEEKLY);
setInt(DateBookRepeatEvent.INTERVAL, 3);
setInt(DateBookRepeatEvent.DAY_IN_WEEK, DateBookRepeatEvent.FRIDAY);
To specify the associated event occurs every month on the second Wednesday until the end of the current year: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.MONTHLY);
setInt(DateBookRepeatEvent.WEEK_IN_MONTH, DateBookRepeatEvent.SECOND);
setInt(DateBookRepeatEvent.DAY_IN_WEEK, DateBookRepeatEvent.WEDNESDAY);
java.util.Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH, 11);
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.AM_PM, Calendar.PM);
cal.set(Calendar.HOUR_OF_DAY, 23);
cal.set(Calendar.MINUTE, 59);
setDate(DateBookRepeatEvent.END, cal.getTime().getTime());
To specify the associated event occurs every year on the 4th of July: setInt(DateBookRepeatEvent.FREQUENCY, DateBookRepeatEvent.YEARLY);
setInt(DateBookRepeatEvent.MONTH_IN_YEAR, DateBookRepeatEvent.JULY);
setInt(DateBookRepeatEvent.DAY_IN_MONTH, 4);
Field Summary | |
static int |
APRIL
APRIL Constant for the month of April. |
static int |
AUGUST
AUGUST Constant for the month of August. |
static int |
COUNT
COUNT The number of times this event repeats including the first time, starting from the first time the event starts (derived from Event.START) and continuing to the last date of the repeat (defined by DateBookRepeatEvent.END). |
static int |
DAILY
DAILY Used for frequency when the Event happens every day. |
static int |
DAY_IN_MONTH
DAY_IN_MONTH The day of the month an Event occurs; for example, 15. |
static int |
DAY_IN_WEEK
DAY_IN_WEEK The days of the week an Event occurs. |
static int |
DAY_IN_YEAR
DAY_IN_YEAR The day of the year an Event occurs; for example, 134. |
static int |
DECEMBER
DECEMBER Constant for the month of December. |
static int |
END
END The ending date of the repeating event. |
static int |
FEBRUARY
FEBRUARY Constant for the month of February. |
static int |
FIFTH
FIFTH Constant for the fifth week of the month. |
static int |
FIFTHLAST
FIFTHLAST Constant for the fifth to last week of the month. |
static int |
FIRST
FIRST Constant for the first week of the month. |
static int |
FOURTH
FOURTH Constant for the fourth week of the month. |
static int |
FOURTHLAST
FOURTHLAST Constant for the fourth to last week of the month. |
static int |
FREQUENCY
FREQUENCY The frequency of the Repeat. |
static int |
FRIDAY
FRIDAY Constant for the day of week Friday. |
static int |
INTERVAL
INTERVAL The number of iterations of the frequency between occurring dates, or how often the frequency repeats. |
static int |
JANUARY
JANUARY Constant for the month of January. |
static int |
JULY
JULY Constant for the month of July. |
static int |
JUNE
JUNE Constant for the month of June. |
static int |
LAST
LAST Constant for the last week of the month. |
static int |
MARCH
MARCH Constant for the month of March. |
static int |
MAY
MAY Constant for the month of May. |
static int |
MONDAY
MONDAY Constant for the day of week Monday. |
static int |
MONTH_IN_YEAR
MONTH_IN_YEAR The month an event occurs. |
static int |
MONTHLY
MONTHLY Used for frequency when the Event happens every month. |
static int |
NOVEMBER
NOVEMBER Constant for the month of November. |
static int |
OCTOBER
OCTOBER Constant for the month of October. |
static int |
SATURDAY
SATURDAY Constant for the day of week Saturday. |
static int |
SECOND
SECOND Constant for the second week of the month. |
static int |
SECONDLAST
SECONDLAST Constant for the second to last week of the month. |
static int |
SEPTEMBER
SEPTEMBER Constant for the month of September. |
static int |
SUNDAY
SUNDAY Constant for the day of week Sunday. |
static int |
THIRD
THIRD Constant for the third week of the month. |
static int |
THIRDLAST
THIRDLAST Constant for the third to last week of the month. |
static int |
THURSDAY
THURSDAY Constant for the day of week Thursday. |
static int |
TUESDAY
TUESDAY Constant for the day of week Tuesday. |
static int |
WEDNESDAY
WEDNESDAY Constant for the day of week Wednesday. |
static int |
WEEK_IN_MONTH
WEEK_IN_MONTH Which week in a month a particular event occurs. |
static int |
WEEKLY
WEEKLY Used for frequency when the Event happens every week. |
static int |
YEARLY
YEARLY Used for frequency when the Event happens every year. |
Constructor Summary | |
DateBookRepeatEvent()
DateBookRepeatEvent Constructor |
Method Summary | |
void |
addExceptDate(long date)
Add a Date for which this RepeatPattern should not occur. |
long |
getDate(int fieldID)
Retrieves a Date field. |
long[] |
getExceptDates()
Returns the Dates for which this RepeatPattern should not occur. |
int |
getInt(int fieldID)
Retrieves an int field. |
void |
removeExceptDate(long date)
Remove a Date for which this RepeatPattern should not occur. |
void |
setDate(int fieldID,
long value)
Sets a Date field. |
void |
setInt(int fieldID,
int value)
Sets an int field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int COUNT
public static final int FREQUENCY
public static final int INTERVAL
public static final int END
public static final int MONTH_IN_YEAR
public static final int WEEK_IN_MONTH
public static final int DAY_IN_WEEK
public static final int DAY_IN_MONTH
public static final int DAY_IN_YEAR
public static final int DAILY
public static final int WEEKLY
public static final int MONTHLY
public static final int YEARLY
public static final int FIRST
public static final int SECOND
public static final int THIRD
public static final int FOURTH
public static final int FIFTH
public static final int LAST
public static final int SECONDLAST
public static final int THIRDLAST
public static final int FOURTHLAST
public static final int FIFTHLAST
public static final int SATURDAY
public static final int FRIDAY
public static final int THURSDAY
public static final int WEDNESDAY
public static final int TUESDAY
public static final int MONDAY
public static final int SUNDAY
public static final int JANUARY
public static final int FEBRUARY
public static final int MARCH
public static final int APRIL
public static final int MAY
public static final int JUNE
public static final int JULY
public static final int AUGUST
public static final int SEPTEMBER
public static final int OCTOBER
public static final int NOVEMBER
public static final int DECEMBER
Constructor Detail |
public DateBookRepeatEvent()
Method Detail |
public void addExceptDate(long date)
date
- date in long ms format to add to the list of except dates.public void removeExceptDate(long date)
date
- date in long ms format to remove from the list of except dates.public long[] getExceptDates()
public int getInt(int fieldID)
fieldID
- The field ID to get, for example COUNT.
java.lang.IllegalArgumentException
- if fieldID is not one of the valid DateBookRepeatEvent field IDs for this method.public void setInt(int fieldID, int value)
fieldID
- The field ID to set, for example COUNT.value
- The value to set the field to.
java.lang.IllegalArgumentException
- if fieldID is not one of the valid DateBookRepeatEvent
field IDs for this method or if the value is outside the range of supported by the native database.public long getDate(int fieldID)
fieldID
- The field ID to get.
java.lang.IllegalArgumentException
- if fieldID is not one of the valid DateBookRepeatEvent field IDs for this method.public void setDate(int fieldID, long value)
fieldID
- The field ID to set.value
- The value to set the field to.
java.lang.IllegalArgumentException
- if fieldID is not one of the valid DateBookRepeatEvent field IDs
for this method or if the value is outside the range of supported by the native database.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |