public boolean UpdateStudyGroupList() { for (int k = 0; k < studyGroupList.size(); k++) { StudyGroup studyGroup = studyGroupList.get(k); databaseHandler.insertStudyGroup(studyGroup.getServerId(), studyGroup.getName()); if (!studyGroup.getProblemList().isEmpty()) { Log.i("Test", "Inserting Problem"); for (int i = 0; i < studyGroup.getProblemList().size(); i++) { Problem problem = studyGroup.getProblemList().get(i); databaseHandler.insertProblem(problem); } } if (!studyGroup.getNoteList().isEmpty()) { Log.i( "Test", "size of Note list for sg id " + studyGroup.getServerId() + " " + studyGroup.getNoteList().size()); for (int i = 0; i < studyGroup.getNoteList().size(); i++) { Note note = studyGroup.getNoteList().get(i); databaseHandler.insertNote(note); } } } return true; }
@Override public void startDocument() throws SAXException { super.startDocument(); databaseHandler = DatabaseHandler.getInstance(); }