Back to project page ProjectStudio.
The source code is released under:
Apache License
If you think the Android project ProjectStudio listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package DB_Provider; //from w ww . j a v a 2 s . c o m import android.provider.BaseColumns; /** * Created by desmond on 1/23/14. */ /* TODO CREATE EXAM MODEL */ public class DB_ABSTRACTS { public DB_ABSTRACTS() { } public static abstract class DBProfessor implements BaseColumns { public static final String DATABASE_TABLE = "PROFESSORS"; public static final String KEY_ID = "_id"; public static final String NAME_COLUMN = "PROFESSOR_NAME"; public static final String EMAIL_COLUMN = "PROFESSOR_EMAIL"; public static final String COURSE_COLUMN = "PROFESSOR_COURSE"; public static final String CREATE_TABLE = "CREATE TABLE " + DATABASE_TABLE + " ( " + KEY_ID + " INTEGER PRIMARY KEY, " + NAME_COLUMN + " TEXT , " + EMAIL_COLUMN + " TEXT , " + COURSE_COLUMN + " TEXT );"; public static final String DELETE_TABLE = "DROP TABLE IF EXISTS " + DATABASE_TABLE; } public static abstract class DBExams implements BaseColumns { public static final String DATABASE_TABLE = "EXAMS"; public static final String KEY_ID = "_id"; public static final String NAME_COLUMN = "TASK_NAME"; public static final String TASK_COLUMN = "TASK_COLUMN"; public static final String LOCATION_COLUMN = "TASK_LOCATION"; public static final String DATE_COLUMN = "TASK_DATE"; public static final String TIME_COLUMN = "TASK_TIME"; public static final String CREATE_TABLE ="CREATE TABLE " + DATABASE_TABLE + " ( " + KEY_ID + " INTEGER PRIMARY KEY, " + NAME_COLUMN + " TEXT NOT NULL, " + TASK_COLUMN + " TEXT NOT NULL, " + LOCATION_COLUMN + " TEXT, " + DATE_COLUMN + " DATETIME DEFAULT CURRENT_DATE, " + TIME_COLUMN + " DATETIME DEFAULT CURRENT_TIME );"; public static final String DELETE_TABLE = "DROP TABLE IF EXISTS " + DATABASE_TABLE; } public static abstract class DBCourse implements BaseColumns { public static final String DATABASE_TABLE = "COURSES"; public static final String KEY_ID = "_id"; public static final String NAME_COLUMN = "COURSE_NAME"; public static final String ROOM_COLUMN = "COURSE_ROOM"; public static final String PROFESSOR_COLUMN = "COURSE_PROFESSOR"; public static final String SEMESTER_COLUMN = "COURSE_SEMESTER"; public static final String PASSED_COLUMN = "COURSE_PASSED"; public static final String PASS_MARK_COLUMN = "PASS_MARK"; public static final String CREATE_TABLE ="CREATE TABLE " + DATABASE_TABLE + " ( " + KEY_ID + " INTEGER PRIMARY KEY, " + NAME_COLUMN + " TEXT NOT NULL, " + ROOM_COLUMN + " TEXT, " + PROFESSOR_COLUMN + " TEXT, " + SEMESTER_COLUMN + " TEXT, " + PASSED_COLUMN + " INTEGER, " + PASS_MARK_COLUMN + " FLOAT );"; public static final String DELETE_TABLE = "DROP TABLE IF EXISTS " + DATABASE_TABLE; } public static abstract class DBTasks implements BaseColumns { public static final String DATABASE_TABLE = "TASKS"; public static final String KEY_ID ="_id"; public static final String LOCATION_COLUMN = "TASK_LOCATION"; public static final String NOTE_COLUMN = "TASK_NOTE"; public static final String DAY_COLUMN = "TASK_DAY"; public static final String TIME_COLUMN = "TASK_TIME"; public static final String PROFESSOR_COLUMN = "TASK_PROFESSOR"; public static final String TITLE_COLUMN = "TITLE_COLUMN"; public static final String CREATE_TABLE = "CREATE TABLE " + DATABASE_TABLE + " ( " + KEY_ID + " INTEGER PRIMARY KEY, " + TITLE_COLUMN + " TEXT, " + NOTE_COLUMN + " TEXT, " + LOCATION_COLUMN + " TEXT, " + DAY_COLUMN + " TEXT, " + TIME_COLUMN + " DATETIME, " + PROFESSOR_COLUMN + " TEXT);"; public static final String DELETE_TABLE = "DROP TABLE IF EXISTS " + DATABASE_TABLE; } }