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

private static void insertStartTime(SQLiteDatabase db, String startStopName, String startTime) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("START_STOPNAME", startStopName);
    routevalues.put("START_TIME_FROM_CAMPUS_JAMES", startTime);

    db.insert("FROMSUROUTE_JAMES", null, routevalues);
}

From source file:Main.java

private static void insertSounds(SQLiteDatabase db, String name, String quote, int sound_id_1) {
    ContentValues soundValues = new ContentValues();
    soundValues.put("pNAME", name);
    soundValues.put("QUOTE", quote);
    soundValues.put("SOUND_ID_1", sound_id_1);
    db.insert("SOUNDS", null, soundValues);
}

From source file:Main.java

private static void insertDrink(SQLiteDatabase db, String name, String description, int resourceId) {
    ContentValues drinkValues = new ContentValues();
    drinkValues.put("NAME", name);
    drinkValues.put("DESCRIPTION", description);
    drinkValues.put("IMAGE_RESOURCE_ID", resourceId);
    db.insert("DRINK", null, drinkValues);
}

From source file:Main.java

private static void insertDrink(SQLiteDatabase db, String name, String description, int resourceId) {
    ContentValues drinkValues = new ContentValues();
    drinkValues.put("NAME", name);
    drinkValues.put("DESCRIPTION", description);
    drinkValues.put("IMAGE_RESOURCE_ID", resourceId);
    ;/*from w ww  . j av a  2 s .  c  o m*/
    db.insert("DRINK", null, drinkValues);
}

From source file:Main.java

private static void insertStartTimeDrumlins(SQLiteDatabase db, String startStopName, String startTime) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("START_STOPNAME_DRUMLINS", startStopName);
    routevalues.put("START_TIME_SU_DRUMLINS", startTime);

    db.insert("FROMSU_DRUMLINS", null, routevalues);
}

From source file:Main.java

private static void insertDrink(SQLiteDatabase db, String name, String description, int resourceID) {

    ContentValues drinkValues = new ContentValues();

    drinkValues.put("NAME", name);
    drinkValues.put("DESCRIPTION", description);
    drinkValues.put("IMAGE_RESOURCE_ID", resourceID);

    db.insert("DRINK", null, drinkValues);

}

From source file:Main.java

public static void insertPlayer(SQLiteDatabase db, String fio, int teamId, String info, int number) {
    ContentValues playerValues = new ContentValues();

    playerValues.put("FIO", fio);
    playerValues.put("TEAM_id", teamId);
    playerValues.put("INFO", info);
    playerValues.put("NUMBER", number);

    db.insert("PLAYERS", null, playerValues);

}

From source file:Main.java

private static void insertPeople(SQLiteDatabase db, String lastName, String name, String bio, int image_id) {
    ContentValues peopleValues = new ContentValues();
    peopleValues.put("LAST_NAME", lastName);
    peopleValues.put("NAME", name);
    peopleValues.put("BIO", bio);
    peopleValues.put("IMAGE_ID", image_id);
    db.insert("PEOPLE", null, peopleValues);
}

From source file:Main.java

private static void insertToSUJames(SQLiteDatabase db, String startStopName, String toStopName, int timeGap) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("START_STOP_JAMES_TO_SU", startStopName);
    routevalues.put("TO_STOP", toStopName);
    routevalues.put("TIME_GAP", timeGap);
    db.insert("TOSUROUTE_JAMES", null, routevalues);

}

From source file:Main.java

private static void insert(SQLiteDatabase db, String tableName, String name, String description,
        int resourceId) {
    ContentValues values = new ContentValues();
    values.put("NAME", name);
    values.put("DESCRIPTION", description);
    values.put("IMAGE_RESOURCE_ID", resourceId);
    db.insert(tableName, null, values);//ww w .  j  av a 2 s.  c  o m
}