mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
added JavaDoc comments
This commit is contained in:
parent
93b7611bc1
commit
4bb3e58c4e
1 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue