Skip to content

Instantly share code, notes, and snippets.

@abhishekhugetech
Created January 6, 2019 07:30
Show Gist options
  • Save abhishekhugetech/73986c18b5d2d16dcd8b633706900358 to your computer and use it in GitHub Desktop.
Save abhishekhugetech/73986c18b5d2d16dcd8b633706900358 to your computer and use it in GitHub Desktop.
Database contract class for Revision
package com.jwhh.jim.notekeeper;
public final class NoteKeepDatabaseContract {
private NoteKeepDatabaseContract(){}
public static final class CourseInfoEntry{
public static final String TABLE_NAME = "course_info";
public static final String COLUMN_COURSE_ID = "course_id";
public static final String COLUMN_COURSE_TITLE = "course_title";
public static final String SQL_CREATE_TABLE = "" +
"CREATE TABLE " + TABLE_NAME + " ("+
COLUMN_COURSE_ID + ", "+
COLUMN_COURSE_TITLE + " )";
}
public static final class NoteInfoEntry{
public static final String TABLE_NAME = "note_info";
public static final String COLUMN_NOTE_TITLE = "note_title";
public static final String COLUMN_NOTE_TEXT = "note_text";
public static final String COLUMN_COURSE_ID = "course_id";
public static final String SQL_CREATE_TABLE = "" +
"CREATE TABLE " + TABLE_NAME + " ("+
COLUMN_NOTE_TITLE + ", "+
COLUMN_NOTE_TEXT + ", "+
COLUMN_COURSE_ID + " )";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment