-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskContracts.java
More file actions
30 lines (21 loc) · 838 Bytes
/
Copy pathTaskContracts.java
File metadata and controls
30 lines (21 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.sachet.database2;
import android.content.ContentUris;
import android.net.Uri;
import android.provider.BaseColumns;
public class TaskContracts {
public static final String TABLE_NAME = "Tasks";
class Columns{
public static final String _ID = BaseColumns._ID;
public static final String TASKS_NAME = "Name";
public static final String TASKS_DESCRIPTION = "Description";
public static final String TASKS_SORTORDER = "SortOrder";
private Columns(){}
}
public static final Uri CONTENT_URI = Uri.withAppendedPath(AppProvider.CONTENT_AUTHORITY_URI, TABLE_NAME);
public static Uri buildUri(long taskId){
return ContentUris.withAppendedId(CONTENT_URI,taskId);
}
public static long getTaskId(Uri uri){
return ContentUris.parseId(uri);
}
}