]> iEval git - unical.git/blob - src/ro/ieval/unical/AlarmOpenHelper.java
Edit event. work in progress[3]
[unical.git] / src / ro / ieval / unical / AlarmOpenHelper.java
1 package ro.ieval.unical;
2
3 import android.content.Context;
4 import android.database.sqlite.SQLiteDatabase;
5 import android.database.sqlite.SQLiteOpenHelper;
6
7 final class AlarmOpenHelper extends SQLiteOpenHelper{
8 public static final String TIME = "time";
9 public static final String EVENT = "event";
10 public static final String TABLE = "alarms";
11
12 private static final int VERSION = 1;
13 private static final String DB = "alarms";
14
15 AlarmOpenHelper (final Context context) {
16 super(context, DB, null, VERSION);
17 }
18
19 @Override
20 public void onCreate(final SQLiteDatabase db){
21 db.execSQL("CREATE TABLE " + TABLE + " (" +
22 TIME + " INTEGER PRIMARY KEY, " +
23 EVENT + " INTEGER NOT NULL);");
24 }
25
26 @Override
27 public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion){
28 // do nothing
29 }
30 }
This page took 0.041604 seconds and 4 git commands to generate.