public class DataAssembler
extends SQLiteOpenHelper
Constructor and Description |
---|
DataAssembler(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
deleteRecord(Record record)
This function deletes a record from the database.
|
java.util.List<Record> |
getAllRecords()
This function returns a list of all the records in the database
|
int |
getRecordsCount()
This function the total number of Record objects in the database
|
void |
onCreate(SQLiteDatabase db)
This method sets up SQL Database with the arrangement of its parameters
|
void |
onUpgrade(SQLiteDatabase db,
int oldVersion,
int newVersion)
This function will upgrade the SQLite database if a new version is released
|
int |
updateRecord(Record record)
This function allows a Record to be updated with new information.
|
public void onCreate(SQLiteDatabase db)
db
- This is the SQLite database to be loaded.public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
The
- parameters are the SQLite database object, and the integers denoting the old and new versionspublic java.util.List<Record> getAllRecords()
public int updateRecord(Record record)
record
- The parameter is the record object to be updated.public void deleteRecord(Record record)
record
- The function takes the record to be deleted as an argument and returns nothingpublic int getRecordsCount()