public class DBAdapter
extends java.lang.Object
Constructor and Description |
---|
DBAdapter(android.content.Context ctx)
Set up connection to the database
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the database
|
android.database.Cursor |
getAllData(boolean isLiveData)
Obtain all data for a given table in the db
|
android.database.Cursor |
getCityInfo(java.lang.String city)
Obtain lat/lng data for a particular city
|
DBAdapter |
open()
Open the database
|
void |
update(java.lang.String[] data)
Updates the entire live table with new data
|
public DBAdapter(android.content.Context ctx)
ctx
- public DBAdapter open() throws android.database.SQLException
android.database.SQLException
public void close()
public android.database.Cursor getAllData(boolean isLiveData)
isLiveData
- which table to use (live or cities)public android.database.Cursor getCityInfo(java.lang.String city)
city
- the city namepublic void update(java.lang.String[] data)
data
- the 2D data array for the nine cities