Back to project page C2Framework.
The source code is released under:
Apache License
If you think the Android project C2Framework 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 gaia.c2.content.sqlite; /*w w w . j a va 2 s. c om*/ import android.content.Context; import android.database.sqlite.SQLiteDatabase; import gaia.c2.content.C2ContentProvider; /** * Created by kmr on 4/21/14. */ public abstract class C2SQLiteContentProvider extends C2ContentProvider { public static final String[] EMPTY_PARAMS = null; private final C2SQLiteHelper helper; protected C2SQLiteContentProvider(Context androidParentContext, String name, int version) { super(androidParentContext); this.helper = new C2SQLiteHelper(this, name, version) { @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { C2SQLiteContentProvider.this.onCreateDatabase(sqLiteDatabase); } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) { C2SQLiteContentProvider.this.onUpgradeDatabase(sqLiteDatabase, oldVersion, newVersion); } }; } public C2SQLiteHelper getHelper() { return helper; } public abstract void onCreateDatabase(SQLiteDatabase database); public abstract void onUpgradeDatabase(SQLiteDatabase database, int oldVersion, int newVersion); }