]> matita.cs.unibo.it Git - logicplayer.git/blob - mainActivity/src/com/example/furt/myapplication/personalTrackerContract.java
2b2d87e180ce74b3126300f2b111c09813c0156c
[logicplayer.git] / mainActivity / src / com / example / furt / myapplication / personalTrackerContract.java
1 package com.example.furt.myapplication;
2
3 import android.provider.BaseColumns;
4
5
6 public final class personalTrackerContract {
7     // To prevent someone from accidentally instantiating the contract class,
8     // give it an empty constructor.
9     public personalTrackerContract() {
10     }
11
12     public static final int DATABASE_VERSION = 1;
13     public static final String DATABASE_NAME = "exercise.db";
14
15     private static final String TEXT_TYPE = " TEXT";
16     private static final String VALUE_TYPE=" DECIMAL";
17     private static final String COMMA_SEP = ",";
18     private static final String INT_TYPE = " INTEGER";
19     private static final String DOUBLE_TYPE=" DOUBLE";
20
21     /* Inner class that defines the table contents */
22     public static abstract class esercizi implements BaseColumns {
23
24         public static final String TABLE_NAME = " esercizi ";
25         public static final String COLUMN_ESERCIZIO = " esercizio ";
26         public static final String COLUMN_MD5 = " md5 ";
27         public static final String COLUMN_UTENTE = " utente ";
28         public static final String COLUMN_TIME = " time ";
29         public static final String COLUMN_CHECK = " checks ";
30         public static final String COLUMN_CLICK = " click ";
31
32         public static final String SQL_CREATE_ENTRIES =
33                 "CREATE TABLE " + TABLE_NAME + " (" +
34                         COLUMN_UTENTE + TEXT_TYPE + COMMA_SEP +
35                         COLUMN_MD5 + TEXT_TYPE + COMMA_SEP +
36                         COLUMN_TIME + DOUBLE_TYPE + COMMA_SEP +
37                         COLUMN_CLICK + INT_TYPE + COMMA_SEP +
38                         COLUMN_ESERCIZIO + TEXT_TYPE + COMMA_SEP +
39                         COLUMN_CHECK + INT_TYPE +
40                         " )";
41
42         public static final String SQL_DELETE_ENTRIES =
43                 "DROP TABLE IF EXISTS " + TABLE_NAME;
44
45     }
46 }