Lines Matching defs:name

40      * Common base for tables of name/value settings.
43 public static final String NAME = "name";
47 String name, String value) {
51 values.put(NAME, name);
56 Log.e(TAG, "Can't set key " + name + " in " + uri, e);
61 Log.e(TAG, "Can't set key " + name + " in " + uri, e);
66 public static Uri getUriFor(Uri uri, String name) {
67 return Uri.withAppendedPath(uri, name);
78 * Look up a name in the database.
80 * @param name to look up in the table
83 public static String getString(ContentResolver resolver, String name) {
88 NameValueTable.NAME + "=?", new String[]{ name }, null);
92 Log.e(TAG, "Can't get key " + name + " from " + CONTENT_URI, e);
100 * Look up a name in the database
102 * @param name to look up in the table
106 public static String getString(ContentResolver resolver, String name, String defaultValue) {
107 String value = getString(resolver, name);
116 * Store a name/value pair into the database.
118 * @param name to store
119 * @param value to associate with the name
123 String name, String value) {
124 return putString(resolver, CONTENT_URI, name, value);
128 * Store a name/value pair into the database.
130 * @param name to store
131 * @param value to associate with the name
135 String name, int value) {
136 return putString(resolver, name, String.valueOf(value));
140 * Look up the value for name in the database, convert it to an int using Integer.parseInt
144 public static int getInt(ContentResolver resolver, String name, int defValue) {
145 String valString = getString(resolver, name);
156 * Look up the value for name in the database, convert it to a long using Long.parseLong
160 public static long getLong(ContentResolver resolver, String name, long defValue) {
161 String valString = getString(resolver, name);
172 * Construct the content URI for a particular name/value pair,
174 * @param name to look up in the table
177 public static Uri getUriFor(String name) {
178 return getUriFor(CONTENT_URI, name);