added JavaDoc comments

This commit is contained in:
prajgov 2017-12-19 20:30:37 +05:30
parent 93b7611bc1
commit 4bb3e58c4e

View file

@ -229,15 +229,30 @@ public class Category {
+ COLUMN_TIMES_USED + " INTEGER"
+ ");";
/**
* Creates new database with provided SQLite database
*
* @param db Category database
*/
public static void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_TABLE_STATEMENT);
}
/**
* Deletes existing database
* @param db Category database
*/
public static void onDelete(SQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
onCreate(db);
}
/**
* Updates given database
* @param db Category database
* @param from Exiting category id
* @param to New category id
*/
public static void onUpdate(SQLiteDatabase db, int from, int to) {
if (from == to) {
return;