@@ -0,0 +1,2195 @@
+/*%0A * USER: mslm%0A * DATE: 4/5/2017%0A */%0A%0Apackage com.gedder.gedderalarm.controller;%0A%0Aimport android.database.Cursor;%0Aimport android.database.CursorWrapper;%0A%0Aimport com.gedder.gedderalarm.db.AlarmClockDBSchema.AlarmClockTable;%0Aimport com.gedder.gedderalarm.model.AlarmClock;%0Aimport com.gedder.gedderalarm.util.DaysOfWeek;%0A%0Aimport java.util.UUID;%0A%0A/** A cursor wrapper to easily retrieve alarm clocks from a cursor. */%0A%0Apublic class AlarmClockCursorWrapper extends CursorWrapper %7B%0A    private static final String TAG = AlarmClockCursorWrapper.class.getSimpleName();%0A%0A    public AlarmClockCursorWrapper(Cursor cursor) %7B%0A        super(cursor);%0A    %7D%0A%0A    public AlarmClock getAlarmClock() %7B%0A        return new AlarmClock(%0A                UUID.fromString(getString(getColumnIndexOrThrow(AlarmClockTable.Columns.UUID))),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.REQUEST_CODE)),%0A                getString(getColumnIndexOrThrow(AlarmClockTable.Columns.ORIGIN)),%0A                getString(getColumnIndexOrThrow(AlarmClockTable.Columns.DESTINATION)),%0A                new DaysOfWeek(getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.REPEAT_DAYS))),%0A                DaysOfWeek.DAY.getDay(getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ALARM_DAY))),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ALARM_HOUR)),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ALARM_MINUTE)),%0A                DaysOfWeek.DAY.getDay(getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ARRIVAL_DAY))),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ARRIVAL_HOUR)),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.ARRIVAL_MINUTE)),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.PREP_HOUR)),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.PREP_MINUTE)),%0A                DaysOfWeek.DAY.getDay(getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.UPPER_BOUND_DAY))),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.UPPER_BOUND_HOUR)),%0A                getInt(getColumnIndexOrThrow(AlarmClockTable.Columns.UPPER_BOUND_MINUTE))%0A        );%0A    %7D%0A%7D%0A

Add a wrapper to more easily retrieve alarm clocks from cursors.