-
Notifications
You must be signed in to change notification settings - Fork 1
3 2 2014
kirklanj edited this page Mar 2, 2014
·
1 revision
Recap/Time since last meeting: Nick worked from 7:30 pm to 4:00 am to refactor the database schema, the DatabaseHelper class, and abstracted out functionality out into the BuildingsRepository rather than BuildingsDataSource and built tests in ClassLocus_QA for all of this.
DatabaseHelper | BuildingsRepository | Building - datafields etc |
---|---|---|
getInstance(context context)- allows for singleton model of database calls oncreate and on upgrade | BuildingsRepository(context) calls getInstance | get...() |
onCreate[private]- log message to the console; just creates the database and sets up the table and the schema including the auto incrementing for the id and the not empty for name | set...() | |
onUpgrade[private]- log message to the console; drops all tables and calls on create | ||
wipe()-drops all the rows in the tables it just depopulates the tables/truncating | ||
insert()- inserts new row record into the database; insert with onConflict flag conflict replace | SaveBuilding(building)pass it a building object and breaks it down and uses the functions from the DatabaseHelper to add it to the database | |
remove()- give an id and it deletes the correlating record | deleteBuilding(id) calls remove() | |
read()- give it an id and it returns a cursor to that row in the database | searchBuilding(query)(name and/or abbrreviation) calls dbhelper search() which returns a cursor to multiple results uses cursorToBUilding converts it to building so it creates a list of buildings it instantiates buildings | |
search()- does a full text search using FTS3; returns a cursor that points to rows in the database that have data that meets the criteria | cursorToBuilding |
1:45-By executive order the gummy worms were opened
1:55- Thomas aka Frodo and Anthony aka Legolas are finishing the details page.
3:10 - Discussed amount of work for this class with other group.
3:18 - Discussed possible themes for demo video