rem:  if (row.item_type == CAL_ITEM_TYPE_EVENT) item = CalEvent(); else if (row.item_type == CAL_ITEM_TYPE_TODO) item = CalTodo(); else throw Components.results.NS_ERROR_NOT_IMPLEMENTED;   item.creationDate = newDateTime(row.time_created); item.lastModifiedTime = newDateTime(row.last_modified); item.parent = this; item.id = row.id; item.title = row.title; item.priority = row.priority; item.privacy = row.privacy; item.status = row.ical_status;  if (row.item_type == CAL_ITEM_TYPE_EVENT) { item.startDate = newDateTime(row.event_start); item.endDate = newDateTime(row.event_end); item.stampTime = newDateTime(row.event_stamp); item.isAllDay = ((row.flags & CAL_ITEM_FLAG_EVENT_ALLDAY) != 0); } else if (row.item_type == CAL_ITEM_TYPE_TODO) { item.entryDate = newDateTime(row.todo_entry); item.dueDate = newDateTime(row.todo_due); item.completedDate = newDateTime(row.todo_complete); item.percentComplete = row.todo_complete; }   item.wrappedJSObject.storage_calendar_id = row.id;  if (flags) flags.value = row.flags; 
add: item.entryDate = newDateTime(row.todo_entry, row.todo_entry_tz); item.dueDate = newDateTime(row.todo_due, row.todo_due_tz); item.completedDate = newDateTime(row.todo_complete, row.todo_complete_tz); item.percentComplete = row.todo_complete; 
context:     getItemFromRow: function (row, flags) {        var item;        if (row.cal_id != this.mCalId) {            // the row selected doesn't belong to this calendar, hmm.                        throw Components.results.NS_ERROR_FAILURE;        }        // create a new item based on the type from the db        if (row.item_type == CAL_ITEM_TYPE_EVENT)            item = CalEvent();        else if (row.item_type == CAL_ITEM_TYPE_TODO)            item = CalTodo();        else            throw Components.results.NS_ERROR_NOT_IMPLEMENTED;        // fill in common bits        item.creationDate = newDateTime(row.time_created);        item.lastModifiedTime = newDateTime(row.last_modified);        item.parent = this;        item.id = row.id;        item.title = row.title;        item.priority = row.priority;        item.privacy = row.privacy;        item.status = row.ical_status;        if (row.item_type == CAL_ITEM_TYPE_EVENT) {            item.startDate = newDateTime(row.event_start);            item.endDate = newDateTime(row.event_end);            item.stampTime = newDateTime(row.event_stamp);            item.isAllDay = ((row.flags & CAL_ITEM_FLAG_EVENT_ALLDAY) != 0);        } else if (row.item_type == CAL_ITEM_TYPE_TODO) {            item.entryDate = newDateTime(row.todo_entry);            item.dueDate = newDateTime(row.todo_due);            item.completedDate = newDateTime(row.todo_complete);            item.percentComplete = row.todo_complete;        }        // we need a way to do this without using wrappedJSObject        item.wrappedJSObject.storage_calendar_id = row.id;        if (flags)            flags.value = row.flags;        return item;    },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/79e066cf274149d3bafb5b1b58e9799f408cb27d/calStorageCalendar.js/clean/calendar/providers/storage/calStorageCalendar.js