|
|
|
@ -17,12 +17,10 @@
|
|
|
|
|
package net.micode.notes.data;
|
|
|
|
|
|
|
|
|
|
import android.net.Uri;
|
|
|
|
|
// Notes 类中定义了很多常量,这些常量大多是int型和string型
|
|
|
|
|
public class Notes {
|
|
|
|
|
public class Notes {// Notes 类中定义了很多常量,这些常量大多是int型和string型
|
|
|
|
|
public static final String AUTHORITY = "micode_notes";
|
|
|
|
|
public static final String TAG = "Notes";
|
|
|
|
|
//定义三个常量,对NoteColumns.TYPE的值进行设置时会用到
|
|
|
|
|
public static final int TYPE_NOTE = 0;
|
|
|
|
|
public static final int TYPE_NOTE = 0;//定义三个常量,对NoteColumns.TYPE的值进行设置时会用到
|
|
|
|
|
public static final int TYPE_FOLDER = 1;
|
|
|
|
|
public static final int TYPE_SYSTEM = 2;
|
|
|
|
|
|
|
|
|
@ -33,8 +31,7 @@ public class Notes {
|
|
|
|
|
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//定义特殊文件夹的ID值,用于标识根文件夹、临时文件夹、通话记录文件夹和回收站文件夹
|
|
|
|
|
public static final int ID_ROOT_FOLDER = 0;
|
|
|
|
|
public static final int ID_ROOT_FOLDER = 0; //定义特殊文件夹的ID值,用于标识根文件夹、临时文件夹、通话记录文件夹和回收站文件夹
|
|
|
|
|
public static final int ID_TEMPARAY_FOLDER = -1;
|
|
|
|
|
public static final int ID_CALL_RECORD_FOLDER = -2;
|
|
|
|
|
public static final int ID_TRASH_FOLER = -3;
|
|
|
|
@ -65,8 +62,7 @@ public class Notes {
|
|
|
|
|
*/
|
|
|
|
|
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");//定义查找数据的指针
|
|
|
|
|
|
|
|
|
|
// 定义NoteColumns的常量,用于后面创建数据库的表头
|
|
|
|
|
public interface NoteColumns {
|
|
|
|
|
public interface NoteColumns {// 定义NoteColumns的常量,用于后面创建数据库的表头
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
@ -172,8 +168,7 @@ public class Notes {
|
|
|
|
|
public static final String VERSION = "version";
|
|
|
|
|
}//常量定义便签的属性
|
|
|
|
|
|
|
|
|
|
// 定义DataColumns的常量,用于后面创建数据库的表头
|
|
|
|
|
public interface DataColumns {
|
|
|
|
|
public interface DataColumns {// 定义DataColumns的常量,用于后面创建数据库的表头
|
|
|
|
|
/**
|
|
|
|
|
* The unique ID for a row
|
|
|
|
|
* <P> Type: INTEGER (long) </P>
|
|
|
|
|