Back to project page FastBudget3.
The source code is released under:
GNU General Public License
If you think the Android project FastBudget3 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.splitstudio.fastbudget3.db; /*from ww w.j a v a2 s.co m*/ import android.content.Context; import com.db4o.ObjectContainer; import de.splitstudio.utils.db.DatabaseMigration; public class FastBudgetMigration extends DatabaseMigration { public FastBudgetMigration(Context context) { super(context); } @Override protected void migrate(int lastVersion, int currentVersion, ObjectContainer db) { if (lastVersion == 0) { deleteNullExpenses(db); } } private void deleteNullExpenses(ObjectContainer db) { for (Category category : db.query(Category.class)) { while (category.getExpenses().remove(null)) {} db.store(category); } db.commit(); } }