|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
package net.micode.notes.data;
|
|
|
|
|
|
|
|
|
|
import android.net.Uri;
|
|
|
|
|
public class Notes {
|
|
|
|
|
public class Notes {//定义Nodes类,初始化参数,都赋值成静态量
|
|
|
|
|
public static final String AUTHORITY = "micode_notes";
|
|
|
|
|
public static final String TAG = "Notes";
|
|
|
|
|
public static final int TYPE_NOTE = 0;
|
|
|
|
@ -54,14 +54,14 @@ public class Notes {
|
|
|
|
|
/**
|
|
|
|
|
* Uri to query all notes and folders
|
|
|
|
|
*/
|
|
|
|
|
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
|
|
|
|
|
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");//指定笔记的路径
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Uri to query data
|
|
|
|
|
*/
|
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
|
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");//用于指定数据的路径,类似上面
|
|
|
|
|
|
|
|
|
|
public interface NoteColumns {
|
|
|
|
|
public interface NoteColumns {//定义笔记集ID、父集ID、创建日期,修改日期等等列名称以及类型,做初始化
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
@ -167,7 +167,7 @@ public class Notes {
|
|
|
|
|
public static final String VERSION = "version";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public interface DataColumns {
|
|
|
|
|
public interface DataColumns {//定义接口,给每行数据ID,类型,所属笔记集ID,内容数据等等做定义
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
@ -241,20 +241,20 @@ public class Notes {
|
|
|
|
|
public static final String DATA5 = "data5";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final class TextNote implements DataColumns {
|
|
|
|
|
public static final class TextNote implements DataColumns {//实现DataColumn接口,为数据库查询操作提供数据列名称
|
|
|
|
|
/**
|
|
|
|
|
* Mode to indicate the text in check list mode or not
|
|
|
|
|
* <P> Type: Integer 1:check list mode 0: normal mode </P>
|
|
|
|
|
*/
|
|
|
|
|
public static final String MODE = DATA1;
|
|
|
|
|
|
|
|
|
|
public static final int MODE_CHECK_LIST = 1;
|
|
|
|
|
public static final int MODE_CHECK_LIST = 1;//表示当前文本是否还处于检查列清单的模式
|
|
|
|
|
|
|
|
|
|
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note";
|
|
|
|
|
|
|
|
|
|
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
|
|
|
|
|
|
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
|
|
|
|
|
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");//指定路径
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final class CallNote implements DataColumns {
|
|
|
|
|