Example usage for android.content ContentValues ContentValues

List of usage examples for android.content ContentValues ContentValues

Introduction

In this page you can find the example usage for android.content ContentValues ContentValues.

Prototype

public ContentValues() 

Source Link

Document

Creates an empty set of values using the default initial size

Usage

From source file:Main.java

public static ContentValues getContentValuesFromMap(Map<String, String> contentValues) {
    ContentValues values = new ContentValues();
    for (String s : contentValues.keySet()) {
        values.put(s, contentValues.get(s));
    }//www . jav  a2 s . c om
    return values;
}

From source file:Main.java

public static long insert(SQLiteDatabase db, String name, String data) {
    ContentValues values = new ContentValues();
    values.put("data", data);
    return db.insert(name, null, values);
}

From source file:Main.java

private static void insertLodiStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("LODI_TIME", time);
    db.insert("JAMES_START", null, routevalues);
}

From source file:Main.java

private static void insertWestcottStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("TOWARDS_START_TIME_WESTCOTT", time);
    db.insert("WESTCOTT_START", null, routevalues);
}

From source file:Main.java

private static void insertDrumlinsStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("TOWARDS_START_TIME_DRUMLINS", time);
    db.insert("DRUMLINS_START", null, routevalues);
}

From source file:Main.java

private static void insertEastCampusStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("STARTSTOP_TIME_EASTCAMPUS", time);
    db.insert("EASTCAMPUS_START", null, routevalues);
}

From source file:Main.java

private static void insertLodiStartWeekends(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("LODI_TIME", time);
    db.insert("JAMES_START_WEEKEND", null, routevalues);
}

From source file:Main.java

private static void insertStopNames(SQLiteDatabase db, String stopNames) {
    ContentValues stopNameValues = new ContentValues();
    stopNameValues.put("STOP_NAMES", stopNames);
    db.insert("STOPS_LIST", null, stopNameValues);

}

From source file:Main.java

private static void insertEastCampusStartSunday(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("STARTSTOP_TIME_EASTCAMPUS", time);
    db.insert("EASTCAMPUS_START_SUNDAY", null, routevalues);
}

From source file:Main.java

public static void insertDrink(SQLiteDatabase db, String name) {
    ContentValues actValues = new ContentValues();
    actValues.put("NAME", name);
    db.insert(dbName, null, actValues);/*from   w ww . j  a  v a  2s .co m*/
}