From c853245c13336b847560dc8f2e35f1897fe0c90a Mon Sep 17 00:00:00 2001 From: 29630 <2963071932qq.com> Date: Wed, 20 Nov 2024 16:14:58 +0800 Subject: [PATCH] =?UTF-8?q?data=E9=87=8C=E9=9D=A2=E7=9A=84Note=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=A7=A3=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Note.java | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 Note.java diff --git a/Note.java b/Note.java new file mode 100644 index 0000000..81dd918 --- /dev/null +++ b/Note.java @@ -0,0 +1,209 @@ +```java +/** + * 笔记和文件夹的列名和内容类型的常量接口。 + */ +public interface NoteColumns { + /** + * 创建日期 + *
类型: INTEGER (long)
+ */ + public static final String CREATED_DATE = "created_date"; + + /** + * 最后修改日期 + *类型: INTEGER (long)
+ */ + public static final String MODIFIED_DATE = "modified_date"; + + /** + * 提醒日期 + *类型: INTEGER (long)
+ */ + public static final String ALERTED_DATE = "alert_date"; + + /** + * 文件夹名称或笔记的文本内容 + *类型: TEXT
+ */ + public static final String SNIPPET = "snippet"; + + /** + * 笔记的小部件ID + *类型: INTEGER (long)
+ */ + public static final String WIDGET_ID = "widget_id"; + + /** + * 笔记的小部件类型 + *类型: INTEGER (long)
+ */ + public static final String WIDGET_TYPE = "widget_type"; + + /** + * 笔记的背景颜色ID + *类型: INTEGER (long)
+ */ + public static final String BG_COLOR_ID = "bg_color_id"; + + /** + * 对于文本笔记,没有附件;对于多媒体笔记,至少有一个附件 + *类型: INTEGER
+ */ + public static final String HAS_ATTACHMENT = "has_attachment"; + + /** + * 文件夹中的笔记数量 + *类型: INTEGER (long)
+ */ + public static final String NOTES_COUNT = "notes_count"; + + /** + * 文件类型:文件夹或笔记 + *类型: INTEGER
+ */ + public static final String TYPE = "type"; + + /** + * 最后同步ID + *类型: INTEGER (long)
+ */ + public static final String SYNC_ID = "sync_id"; + + /** + * 标记是否本地已修改 + *类型: INTEGER
+ */ + public static final String LOCAL_MODIFIED = "local_modified"; + + /** + * 移动到临时文件夹前的原始父ID + *类型: INTEGER
+ */ + public static final String ORIGIN_PARENT_ID = "origin_parent_id"; + + /** + * gtask ID + *类型: TEXT
+ */ + public static final String GTASK_ID = "gtask_id"; + + /** + * 版本号 + *类型: INTEGER (long)
+ */ + public static final String VERSION = "version"; +} + +/** + * 笔记和文件夹的数据列常量接口。 + */ +public interface DataColumns { + /** + * 行的唯一ID + *类型: INTEGER (long)
+ */ + public static final String ID = "_id"; + + /** + * 此行表示的项目的MIME类型。 + *类型: TEXT
+ */ + public static final String MIME_TYPE = "mime_type"; + + /** + * 此数据所属笔记的引用ID + *类型: INTEGER (long)
+ */ + public static final String NOTE_ID = "note_id"; + + /** + * 笔记或文件夹的创建日期 + *类型: INTEGER (long)
+ */ + public static final String CREATED_DATE = "created_date"; + + /** + * 最后修改日期 + *类型: INTEGER (long)
+ */ + public static final String MODIFIED_DATE = "modified_date"; + + /** + * 数据的内容 + *类型: TEXT
+ */ + public static final String CONTENT = "content"; + + /** + * 泛型数据列,具体含义特定,用于整数数据类型 + *类型: INTEGER
+ */ + public static final String DATA1 = "data1"; + + /** + * 泛型数据列,具体含义特定,用于整数数据类型 + *类型: INTEGER
+ */ + public static final String DATA2 = "data2"; + + /** + * 泛型数据列,具体含义特定,用于TEXT数据类型 + *类型: TEXT
+ */ + public static final String DATA3 = "data3"; + + /** + * 泛型数据列,具体含义特定,用于TEXT数据类型 + *类型: TEXT
+ */ + public static final String DATA4 = "data4"; + + /** + * 泛型数据列,具体含义特定,用于TEXT数据类型 + *类型: TEXT
+ */ + public static final String DATA5 = "data5"; +} + +/** + * 文本笔记特定列的常量类。 + */ +public static final class TextNote implements DataColumns { + /** + * 模式,表示文本是否在检查列表模式下 + *类型: Integer 1:检查列表模式 0:普通模式
+ */ + public static final String MODE = DATA1; + + 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 class CallNote implements DataColumns { + /** + * 通话记录的通话日期 + *类型: INTEGER (long)
+ */ + public static final String CALL_DATE = DATA1; + + /** + * 通话记录的电话号码 + *类型: TEXT
+ */ + public static final String PHONE_NUMBER = DATA3; + + public static final String CONTENT_TYPE = "vnd.android.cursor.dir/call_note"; + + public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note"; + + public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note"); +} +```