Search in sources :

Example 11 with AlphaTourDbHelper

use of com.example.alphatour.dblite.AlphaTourDbHelper in project AlphaTour by Frank99DG.

the class Step4 method getIdPath.

private String getIdPath(String name) {
    String idP = "";
    AlphaTourDbHelper dbAlpha = new AlphaTourDbHelper(getContext());
    SQLiteDatabase db = dbAlpha.getReadableDatabase();
    Cursor cursor = db.rawQuery(CommandDbAlphaTour.Command.SELECT_ID_PATH, new String[] { name });
    if (cursor.moveToFirst()) {
        idP = cursor.getString(cursor.getColumnIndexOrThrow(AlphaTourContract.AlphaTourEntry.NAME_COLUMN_PATH_ID));
    }
    return idP;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) AlphaTourDbHelper(com.example.alphatour.dblite.AlphaTourDbHelper) Cursor(android.database.Cursor)

Aggregations

SQLiteDatabase (android.database.sqlite.SQLiteDatabase)11 AlphaTourDbHelper (com.example.alphatour.dblite.AlphaTourDbHelper)11 ContentValues (android.content.ContentValues)8 Cursor (android.database.Cursor)5 ElementString (com.example.alphatour.oggetti.ElementString)3 Constraint (com.example.alphatour.oggetti.Constraint)2 Element (com.example.alphatour.oggetti.Element)1 ZoneChoosed (com.example.alphatour.oggetti.ZoneChoosed)1