Android Open Source - Expensify Database Impl






From Project

Back to project page Expensify.

License

The source code is released under:

MIT License

If you think the Android project Expensify listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.hgs.course.expense.database;
/*from  w  w w. j  ava2  s  . co  m*/
import com.hgs.course.expense.constants.ExpenseConstants;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseImpl extends SQLiteOpenHelper implements ExpenseConstants {  
  
  public DatabaseImpl(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);    
  }
  
  @Override
  public void onCreate(SQLiteDatabase objDB) {
    objDB.execSQL(sqlDropTableCategory);
    objDB.execSQL(sqlDropTableExpense);
    objDB.execSQL(sqlCreateTableCategory);
    objDB.execSQL(sqlCreateTableExpense);
    objDB.execSQL(sqlInsertCategory1);
    objDB.execSQL(sqlInsertCategory2);
    objDB.execSQL(sqlInsertCategory3);
    objDB.execSQL(sqlInsertCategory4);
  }

  @Override
  public void onUpgrade(SQLiteDatabase objDB, int oldVersion, int newVersion) {
    // TODO Need to Upgrade When Older Version Found
  }

}




Java Source Code List

com.hgs.course.expense.Expense.java
com.hgs.course.expense.constants.ExpenseConstants.java
com.hgs.course.expense.database.DatabaseImpl.java
com.hgs.course.expense.datastore.CategoryDatabaseOperationImpl.java
com.hgs.course.expense.datastore.DatabaseOperation.java
com.hgs.course.expense.datastore.ExpenseDatabaseOperationImpl.java
com.hgs.course.expense.datastore.FacadeStore.java