}
// recurrence
RecurrenceObject recurObject = (RecurrenceObject) _outer.getItem( TaskObject.FIELD_RECURRENCE ).getValue();
if( recurObject != null ) {
BlackBerryToDo bbTodo = (BlackBerryToDo) _todo;
RepeatRule repeat = new RepeatRule();
// count
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_COUNT ).getValue();
int count = i.intValue();
if( count >= 0 ) {
repeat.setInt( RepeatRule.COUNT, count );
}
// frequency
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_FREQUENCY ).getValue();
int freq = i.intValue();
repeat.setInt( RepeatRule.FREQUENCY, RecurrenceObject.frequencyToRepeatRule( freq ) );
// interval
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_INTERVAL ).getValue();
int interval = i.intValue();
if( interval > 0 ) {
repeat.setInt( RepeatRule.INTERVAL, interval );
}
// end
d = (Date) recurObject.getItem( RecurrenceObject.FIELD_END ).getValue();
if( d != null ) {
long endTime = d.getTime();
repeat.setDate( RepeatRule.END, endTime );
}
// monthInYear
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_MONTHINYEAR ).getValue();
int monthInYear = i.intValue();
if( monthInYear > 0 ) {
repeat.setInt( RepeatRule.MONTH_IN_YEAR, monthInYear );
}
// weekInMonth
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_WEEKINMONTH ).getValue();
int weekInMonth = i.intValue();
if( weekInMonth > 0 ) {
repeat.setInt( RepeatRule.WEEK_IN_MONTH, weekInMonth );
}
// dayInWeek
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_DAYINWEEK ).getValue();
int dayInWeek = i.intValue();
if( dayInWeek > 0 ) {
repeat.setInt( RepeatRule.DAY_IN_WEEK, dayInWeek );
}
// dayInMonth
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_DAYINMONTH ).getValue();
int dayInMonth = i.intValue();
if( dayInMonth > 0 ) {
repeat.setInt( RepeatRule.DAY_IN_MONTH, dayInMonth );
}
// dayInYear
i = (Integer) recurObject.getItem( RecurrenceObject.FIELD_DAYINYEAR ).getValue();
int dayInYear = i.intValue();
if( dayInYear > 0 ) {
repeat.setInt( RepeatRule.DAY_IN_YEAR, dayInYear );
}
bbTodo.setRepeat( repeat );
}
// reminder
long reminderTime = -1L;
boolean isAbsoluteReminder = true;