Android Open Source - flashcards Card Contract






From Project

Back to project page flashcards.

License

The source code is released under:

MIT License

If you think the Android project flashcards 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 edu.cmu.hcii.ssui.flashcards.db;
/* www.  j a  va2s .  co m*/
import android.provider.BaseColumns;
import edu.cmu.hcii.ssui.flashcards.Card;
import edu.cmu.hcii.ssui.flashcards.Deck;

public final class CardContract {

    /**
     * SQLite table names.
     */
    public interface Tables {
        String CARDS = "cards";
        String DECKS = "decks";
    }

    /**
     * {@link Card} table columns.
     */
    public interface CardTable extends BaseColumns {
        String DECK_ID = "deck_id";
        String FRONT = "front";
        String BACK = "back";
    }

    /**
     * {@link Deck} table columns.
     */
    public interface DeckTable extends BaseColumns {
        String NAME = "name";
        String DESCRIPTION = "description";
    }

    public interface Queries {
        String GET_DECK = "SELECT * FROM " + Tables.DECKS + " WHERE " + DeckTable._ID + "= ?";
        String GET_ALL_DECKS = "SELECT * FROM " + Tables.DECKS;
        String GET_CARDS_BY_DECK = "SELECT * FROM " + Tables.CARDS + " WHERE " + CardTable.DECK_ID + "= ?";
    }

    private CardContract() {
        // Should never be instantiated.
    }

}




Java Source Code List

edu.cmu.hcii.ssui.flashcards.CardListActivity.java
edu.cmu.hcii.ssui.flashcards.Card.java
edu.cmu.hcii.ssui.flashcards.Deck.java
edu.cmu.hcii.ssui.flashcards.StudyActivity.java
edu.cmu.hcii.ssui.flashcards.StudyListActivity.java
edu.cmu.hcii.ssui.flashcards.db.CardContract.java
edu.cmu.hcii.ssui.flashcards.db.CardDatabase.java
edu.cmu.hcii.ssui.flashcards.db.CardDbHelper.java
edu.cmu.hcii.ssui.flashcards.dialogs.DeleteCardDialog.java
edu.cmu.hcii.ssui.flashcards.dialogs.DeleteDeckDialog.java
edu.cmu.hcii.ssui.flashcards.dialogs.EditCardDialog.java
edu.cmu.hcii.ssui.flashcards.dialogs.EditDeckDialog.java
edu.cmu.hcii.ssui.flashcards.dialogs.NewCardDialog.java
edu.cmu.hcii.ssui.flashcards.dialogs.NewDeckDialog.java
edu.cmu.hcii.ssui.flashcards.util.ArgUtil.java