com.sudogeeks.talking_reminder.ReminderDatabase Class Reference

Class to manage database This class is for managing the database. More...

Inheritance diagram for com.sudogeeks.talking_reminder.ReminderDatabase:

## Public Member Functions

| ReminderDatabase (Context context)
void | onCreate (SQLiteDatabase db)
void | onUpgrade (SQLiteDatabase db, int oldVersion, int newVersion)
int | addReminder (ReminderDO reminderDO)
ReminderDO | getReminder (int id)
List< ReminderDO > | getAllReminders ()
int | getRemindersCount ()
int | updateReminder (ReminderDO reminderDO)
void | deleteReminder (ReminderDO reminderDO)

## Detailed Description

Class to manage database This class is for managing the database.

Definition at line 15 of file ReminderDatabase.java.

## Member Function Documentation

## addReminder()

int com.sudogeeks.talking_reminder.ReminderDatabase.addReminder | ( | ReminderDO | reminderDO | ) |

This method is for adding ReminderDO into the reminder table in database

Parameters

  reminderDO |

Returns

Definition at line 83 of file ReminderDatabase.java.

## deleteReminder()

void com.sudogeeks.talking_reminder.ReminderDatabase.deleteReminder | ( | ReminderDO | reminderDO | ) |

This method is for deleting single ReminderDo

Parameters

  reminderDO |

Definition at line 208 of file ReminderDatabase.java.

## getAllReminders()

List<ReminderDO> com.sudogeeks.talking_reminder.ReminderDatabase.getAllReminders | ( |  | ) |

This method is for getting all reminders for a particular user

Returns
  List of <ReminderDo>

Definition at line 138 of file ReminderDatabase.java.

## getReminder()

ReminderDO com.sudogeeks.talking_reminder.ReminderDatabase.getReminder | ( | int | id | ) |

To get single ReminderDO corresponding to the id in parameter

Parameters

  id |

Returns
  reminderDo

Definition at line 106 of file ReminderDatabase.java.

## getRemindersCount()

int com.sudogeeks.talking_reminder.ReminderDatabase.getRemindersCount | ( |  | ) |

This method is for Getting Reminders Count

Returns
  reminder count

Definition at line 172 of file ReminderDatabase.java.

## onCreate()

void com.sudogeeks.talking_reminder.ReminderDatabase.onCreate | ( | SQLiteDatabase | db | ) |

Creating Tables for reminder

Parameters

  db |

Definition at line 45 of file ReminderDatabase.java.

## onUpgrade()

void com.sudogeeks.talking_reminder.ReminderDatabase.onUpgrade | ( | SQLiteDatabase | db,
|  | int | oldVersion,
|  | int | newVersion
| ) |  |

Upgrading database

Parameters

  db |
  oldVersion |
  newVersion |

Definition at line 67 of file ReminderDatabase.java.

## updateReminder()

int com.sudogeeks.talking_reminder.ReminderDatabase.updateReminder | ( | ReminderDO | reminderDO | ) |

This method is for updating single ReminderDO

Parameters

  reminderDO |

Returns

Definition at line 187 of file ReminderDatabase.java.

The documentation for this class was generated from the following file:

- C:/Users/Raushan Raj/StudioProjects/TalkingReminder2/TalkingReminder/app/src/main/java/com/sudogeeks/talking_reminder/ReminderDatabase.java