Back to project page journal.
The source code is released under:
MIT License
If you think the Android project journal listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cochrane343.journal.contentprovider; /*ww w .j a v a 2 s . co m*/ import android.net.Uri; import android.provider.BaseColumns; /** * @author cochrane343 * @version 1.0 */ public class JournalContract { public static final String AUTHORITY = "cochrane343.journal"; private static final String URI_PREFIX = "content://" + AUTHORITY + "/" ; /** * The select clause for selecting expenses within a certain time span */ public static final String TIMESTAMP_RANGE_CLAUSE = Expense._TIMESTAMP + " >= ? AND " + Expense._TIMESTAMP + " <= ?"; /** * The select clause for selecting expenses from a specific category */ public static final String EXPENSE_CATEGORY_CLAUSE = Expense._CATEGORY + " = ?"; /** * Private constructor to prevent instantiation */ private JournalContract() {} public static class Expense implements BaseColumns { public static final String TABLE_NAME = "Expense"; public static final String EXPENSES_PATH = "expenses"; public static final Uri EXPENSES_URI = Uri.parse(URI_PREFIX + EXPENSES_PATH); public static final String _DESCRIPTION = "description"; public static final String _COST = "cost"; public static final String _TIMESTAMP = "timestamp"; public static final String _CATEGORY = "category"; /** * Private constructor to prevent instantiation */ private Expense() {} } public static class Category implements BaseColumns { public static final String TABLE_NAME = "Category"; public static final String TOTALS_VIEW_NAME = "CategoryTotal"; public static final String CATEGORIES_PATH = "categories"; public static final Uri CATEGORIES_URI = Uri.parse(URI_PREFIX + CATEGORIES_PATH); public static final String CATEGORY_TOTALS_PATH = "categoryTotals"; public static final Uri CATEGORY_TOTALS_URI = Uri.parse(URI_PREFIX + CATEGORY_TOTALS_PATH); public static final String _NAME = "name"; public static final String _SORT_ORDER = "sortOrder"; public static final String _TOTAL = "total"; public static final String HOUSING = "Housing"; public static final String FOOD = "Food"; public static final String DRINKS = "Drinks"; public static final String CLOTHING = "Clothing"; public static final String SUPPLIES = "Supplies"; public static final String TECHNOLOGY = "Technology"; public static final String TRANSPORT = "Transport"; public static final String MISC = "Misc"; /** * Private constructor to prevent instantiation */ private Category() {} } }