|
|
|
@ -33,12 +33,12 @@ import net.micode.notes.data.Notes.DataColumns;
|
|
|
|
|
import net.micode.notes.data.Notes.NoteColumns;
|
|
|
|
|
import net.micode.notes.data.NotesDatabaseHelper.TABLE;
|
|
|
|
|
|
|
|
|
|
public class NotesProvider extends ContentProvider {
|
|
|
|
|
private static final UriMatcher mMatcher; // UriMatcher类用于分辨数据表
|
|
|
|
|
public class NotesProvider extends ContentProvider {// uri操作相关类,用于对数据库进行操作
|
|
|
|
|
private static final UriMatcher mMatcher; // UriMatcher类用于分辨数据操作类型,用于匹配不同的uri
|
|
|
|
|
|
|
|
|
|
private NotesDatabaseHelper mHelper; // 建立NotesDatabaseHelper类对象
|
|
|
|
|
private NotesDatabaseHelper mHelper; // 建立NotesDatabaseHelper类对象,用于数据库操作
|
|
|
|
|
|
|
|
|
|
private static final String TAG = "NotesProvider"; // 设置类名值
|
|
|
|
|
private static final String TAG = "NotesProvider"; // 设置类名标签,用于调试
|
|
|
|
|
|
|
|
|
|
private static final int URI_NOTE = 1; // 设置便签uri
|
|
|
|
|
private static final int URI_NOTE_ITEM = 2;
|
|
|
|
|