Android Open Source - Netball Database Helper






From Project

Back to project page Netball.

License

The source code is released under:

GNU General Public License

If you think the Android project Netball 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.prisch.content;
//w  w w  .  j  a  va2 s .  c  o m
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.prisch.model.Game;
import com.prisch.model.Player;
import com.prisch.model.Record;
import com.prisch.model.TeamMember;

public class DatabaseHelper extends SQLiteOpenHelper {

    // ===== Inherited Operations =====

    public DatabaseHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        Player.onCreate(db);
        Game.onCreate(db);
        TeamMember.onCreate(db);
        Record.onCreate(db);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        Player.onUpgrade(db, oldVersion, newVersion);
        Game.onUpgrade(db, oldVersion, newVersion);
        TeamMember.onUpgrade(db, oldVersion, newVersion);
        Record.onUpgrade(db, oldVersion, newVersion);
    }

    // ===== Constants =====

    private static final String DATABASE_NAME = "netball.db";
    private static final int DATABASE_VERSION = 1;
}




Java Source Code List

com.prisch.activities.ActionsActivity.java
com.prisch.activities.BaseTeamActivity.java
com.prisch.activities.DashboardActivity.java
com.prisch.activities.GameStatsActivity.java
com.prisch.activities.GamesActivity.java
com.prisch.activities.PlayersActivity.java
com.prisch.activities.PositionsActivity.java
com.prisch.activities.SubstitutionActivity.java
com.prisch.activities.TeamActivity.java
com.prisch.content.DatabaseHelper.java
com.prisch.content.NetballContentProvider.java
com.prisch.controls.ActionButton.java
com.prisch.fragments.PositionStatsFragment.java
com.prisch.loaders.GameStatsLoader.java
com.prisch.model.Action.java
com.prisch.model.GameStats.java
com.prisch.model.Game.java
com.prisch.model.OpponentAction.java
com.prisch.model.OpponentRecord.java
com.prisch.model.PlayerStats.java
com.prisch.model.Player.java
com.prisch.model.Position.java
com.prisch.model.Record.java
com.prisch.model.TeamMember.java
com.prisch.repositories.GameRepository.java
com.prisch.repositories.OpponentRecordRepository.java
com.prisch.repositories.PlayerRepository.java
com.prisch.repositories.RecordRepository.java
com.prisch.repositories.StatsRepository.java
com.prisch.repositories.TeamMemberRepository.java
com.prisch.util.DateUtils.java
com.prisch.views.GameAdapter.java
com.prisch.views.GameStatsAdapter.java
com.prisch.views.PlayerStatsAdapter.java
com.prisch.views.PlayerStatsListItem.java
com.prisch.views.TeamAdapter.java