Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class Main {
    static final String TABLE_NAME = "cache_data";
    static final String FIELD_SET_NAME = "set_name";
    static final String FIELD_VALUE = "value";

    public static Cursor searchByValue(SQLiteDatabase db, String key, String value) {
        return db.query(TABLE_NAME, null, FIELD_SET_NAME + "= ?," + FIELD_VALUE + "=?", new String[] { key, value },
                null, null, null);
    }
}