@Override public int insertNotes(long deckId, ContentValues[] valuesArr) { Uri.Builder builder = Note.CONTENT_URI.buildUpon(); builder.appendQueryParameter(Note.DECK_ID_QUERY_PARAM, String.valueOf(deckId)); return mResolver.bulkInsert(builder.build(), valuesArr); }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }
/** * Creates random weather data for 7 days starting today * @param context */ public static void insertFakeData(Context context) { //Get today's normalized date long today = SunshineDateUtils.normalizeDate(System.currentTimeMillis()); List<ContentValues> fakeValues = new ArrayList<ContentValues>(); //loop over 7 days starting today onwards for(int i=0; i<7; i++) { fakeValues.add(FakeDataUtils.createTestWeatherContentValues(today + TimeUnit.DAYS.toMillis(i))); } // Bulk Insert our new weather data into Sunshine's Database context.getContentResolver().bulkInsert( WeatherContract.WeatherEntry.CONTENT_URI, fakeValues.toArray(new ContentValues[7])); } }