• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2007 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.example.android.notepad;
18 
19 import android.net.Uri;
20 import android.provider.BaseColumns;
21 
22 /**
23  * Convenience definitions for NotePadProvider
24  */
25 public final class NotePad {
26     public static final String AUTHORITY = "com.example.notepad.provider.NotePad";
27 
28     // This class cannot be instantiated
NotePad()29     private NotePad() {}
30 
31     /**
32      * Notes table
33      */
34     public static final class NoteColumns implements BaseColumns {
35         // This class cannot be instantiated
NoteColumns()36         private NoteColumns() {}
37 
38         /**
39          * The content:// style URL for this table
40          */
41         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/notes");
42 
43         /**
44          * The MIME type of {@link #CONTENT_URI} providing a directory of notes.
45          */
46         public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.note";
47 
48         /**
49          * The MIME type of a {@link #CONTENT_URI} sub-directory of a single note.
50          */
51         public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.note";
52 
53         /**
54          * The default sort order for this table
55          */
56         public static final String DEFAULT_SORT_ORDER = "modified DESC";
57 
58         /**
59          * The title of the note
60          * <P>Type: TEXT</P>
61          */
62         public static final String TITLE = "title";
63 
64         /**
65          * The note itself
66          * <P>Type: TEXT</P>
67          */
68         public static final String NOTE = "note";
69 
70         /**
71          * The timestamp for when the note was created
72          * <P>Type: INTEGER (long from System.curentTimeMillis())</P>
73          */
74         public static final String CREATED_DATE = "created";
75 
76         /**
77          * The timestamp for when the note was last modified
78          * <P>Type: INTEGER (long from System.curentTimeMillis())</P>
79          */
80         public static final String MODIFIED_DATE = "modified";
81     }
82 }
83