Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save barmgeat/28fc52f9f4bd68eae9024a09f716ea25 to your computer and use it in GitHub Desktop.
Save barmgeat/28fc52f9f4bd68eae9024a09f716ea25 to your computer and use it in GitHub Desktop.
sqlite contract class
package com.example.AppName.new_package_name;
import android.provider.BaseColumns;
public final class ContractClass {
// content Uri
public static final String CONTENT_AUTHORITY = "com.example.android.AppName";
public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
public static final String PATH_WORDS = "words";
public static final Uri CONTENT_URI = Uri.withAppendedPath(BASE_CONTENT_URI, PATH_WORDS);
public ContractClass(){
}
// First Table Words Table :
public static final class WordsEntry implements BaseColumns{
public static String TABLE_NAME = "words";
// init Columns :
public static final String _ID = BaseColumns._ID;
public static final String COLUMN_WORD = "word";
public static final String COLUMN_WORD_T = "t_word";
public static final String COLUMN_WORD_T2 = "t2_word";
public static final String COLUMN_WORD_T3 = "t3_word";
public static final String COLUMN_ARTIKEL = "artikel";
//init Artikel :
public static final int ARTIKEL_MALE = 1 ;
public static final int ARTIKEL_FEMALE = 2 ;
public static final int ARTIKEL_UNKNOWN = 3 ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment