Back to project page ContentProviderProcessor.
The source code is released under:
Apache License
If you think the Android project ContentProviderProcessor 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 de.wackernagel.android.contractcontentprovider.sample.provider; // w w w . ja v a 2 s. c o m import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import de.wackernagel.android.contractcontentprovider.Contract; public class CustomerContract implements Contract { public static final String TABLE = "customers"; public static final String COLUMN_NAME = "name"; public static final Uri CONTENT_URI = Uri.parse( "content://" + SampleProvider.AUTHORITY + "/" + TABLE ); public static final String CREATE_STATEMENT = "create table if not exists " + TABLE + "(" + COLUMN_ID + " integer primary key autoincrement, " + COLUMN_NAME + " text not null );"; @Override public void onCreateStatement(SQLiteDatabase db) { db.execSQL( CREATE_STATEMENT ); } @Override public void onUpgradeStatement(SQLiteDatabase db, int oldVersion, int newVersion) { } @Override public String getTable() { return TABLE; } }