Android Open Source - SMSAlive D B Helper






From Project

Back to project page SMSAlive.

License

The source code is released under:

Apache License

If you think the Android project SMSAlive 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.futuretech.app.smsalive.repository;
/*from  www  .  java2 s .c  om*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.futuretech.app.smsalive.utils.Constants;

/**
 * Created by ironhulk on 2014/11/27.
 */
public class DBHelper extends SQLiteOpenHelper {

    public DBHelper(Context context){
        super(context, Constants.DB_NAME,null,Constants.DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("CREATE TABLE "
                + Constants.TABLE_NAME_TRANS
                + " ( " + Constants.COL_TRANS_ID   + "  INTEGER PRIMARY KEY AUTOINCREMENT, "
                + Constants.COL_ACCOUNT_NUMBER     + " TEXT, "
                + Constants.COL_ACCOUNT_BALANCE    + " REAL, "
                + Constants.COL_ACCOUNT_TYPE       + " TEXT, "
                + Constants.COL_TRANS_DATE         + " NUMERIC, "
                + Constants.COL_TRANS_PLACE        + " TEXT, "
                + Constants.COL_TRANS_TYPE         + " TEXT, "
                + Constants.COL_TRANS_AMOUNT       + " NUMERIC)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS context");
        onCreate(db);
    }
}




Java Source Code List

com.futuretech.app.smsalive.ApplicationTest.java
com.futuretech.app.smsalive.Test.java
com.futuretech.app.smsalive.Application.Services.ApplicationServices.java
com.futuretech.app.smsalive.Application.Services.TranscactionTypeHandler.java
com.futuretech.app.smsalive.Application.Services.impl.ApplicationServicesImpl.java
com.futuretech.app.smsalive.Application.Services.impl.DepositHandler.java
com.futuretech.app.smsalive.Application.Services.impl.PurchaseHandler.java
com.futuretech.app.smsalive.Application.Services.impl.WithDrawalHandler.java
com.futuretech.app.smsalive.Domain.crud.AccountTransactionCrudService.java
com.futuretech.app.smsalive.Domain.crud.impl.AccountTransactionCrudServiceImpl.java
com.futuretech.app.smsalive.Domain.models.AccountTransaction.java
com.futuretech.app.smsalive.Presentation.activities.InitializingData.java
com.futuretech.app.smsalive.Presentation.fragments.InitialDataGathering.java
com.futuretech.app.smsalive.Presentation.fragments.WelcomeFragment.java
com.futuretech.app.smsalive.Presentation.services.DataGatheringService.java
com.futuretech.app.smsalive.repository.DBHelper.java
com.futuretech.app.smsalive.repository.RepositoryUtil.java
com.futuretech.app.smsalive.utils.Constants.java
com.futuretech.app.smsalive.utils.Factory.java
com.futuretech.app.smsalive.utils.TransactionTypes.java