question: private void writeCategory ( Category category , List < Challenge > challengeList , List < Answer > answerList ) { long oldCategoryId = category . getId ( ) ; category . setId ( null ) ; long categoryId = mCategoryDataSource . create ( category ) ; for ( int i = 0 ; i < challengeList . size ( ) ; i ++ ) { Challenge challenge = challengeList . get ( i ) ; if ( challenge != null && challenge . getCategoryId ( ) == oldCategoryId ) { challenge . setCategoryId ( categoryId ) ; writeChallenge ( challenge , answerList ) ; challengeList . set ( i , null ) ; } } }
target:  Writes a category with their challenges and their answers to the database