Android Open Source - PomodoroTimer Pomodoro Timer D B Contract






From Project

Back to project page PomodoroTimer.

License

The source code is released under:

GNU General Public License

If you think the Android project PomodoroTimer 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.example.pomodorotimer;
/*from  w ww . j  av a  2 s .co m*/
import android.provider.BaseColumns;

/**
 * The Class PomodoroTimerDBContract. Contains definitions of databases tables.
 */
public final class PomodoroTimerDBContract
{
  
  /**
   * Instantiates a new object of class.
   */
  public PomodoroTimerDBContract() {} 
  
  /** The Constant COLUMN_ID. */
  public static final String COLUMN_ID = "_id";
  
  /** The Constant TEXT_TYPE. */
  public static final String TEXT_TYPE = " TEXT";
  
  /** The Constant INT_TYPE. */
  public static final String INT_TYPE = " INT";
  
  /** The Constant COMMA_SEP. */
  public static final String COMMA_SEP = ",";
  
  /**
   * The Class PomodorosTable.
   * Defines fields of database's table "pomodoro".
   */
  public static abstract class PomodorosTable implements BaseColumns
  {
    
    /** The Constant TABLE_NAME. */
    public static final String TABLE_NAME = "pomodoros";
    /** The Constant COLUMN_NAME_START_DATE. */
    public static final String COLUMN_NAME_START_DATE = "startdate";
    
    /** The Constant COLUMN_NAME_STOP_DATE. */
    public static final String COLUMN_NAME_STOP_DATE = "stopdate";
    
    /** The Constant COLUMN_NAME_START_HOUR. */
    public static final String COLUMN_NAME_START_HOUR = "starthour";
    
    /** The Constant COLUMN_NAME_STOP_HOUR. */
    public static final String COLUMN_NAME_STOP_HOUR = "stophour";
    
    /** The Constant COLUMN_NAME_NUM_IN_ROW. */
    public static final String COLUMN_NAME_NUM_IN_ROW = "numinrow";
    
    /** The Constant CREATE_TABLE. */
    public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + 
        COLUMN_ID + " INTEGER PRIMARY KEY, " + 
        COLUMN_NAME_START_DATE + TEXT_TYPE + COMMA_SEP +
        COLUMN_NAME_STOP_DATE + TEXT_TYPE + COMMA_SEP +
        COLUMN_NAME_START_HOUR + TEXT_TYPE + COMMA_SEP +
        COLUMN_NAME_STOP_HOUR + TEXT_TYPE + COMMA_SEP +
        COLUMN_NAME_NUM_IN_ROW + INT_TYPE +        
          " )";
    
    /** The Constant DROP_TABLE. */
    public static final String DROP_TABLE = "DROP TABLE IF EXISTS " + TABLE_NAME;
  }
  
  /**
   * The Class TagsTable.
   * Defines fields of database's table "tags".
   */
  public static abstract class TagsTable implements BaseColumns
  {
    
    /** The Constant TABLE_NAME. */
    public static final String TABLE_NAME = "tags";
    
    /** The Constant COLUMN_NAME_TAG_NAME. */
    public static final String COLUMN_NAME_TAG_NAME = "tagname";
    
    /** The Constant COLUMN_NAME_LAST_USED. */
    public static final String COLUMN_NAME_LAST_USED = "lastused";
    
    /** The Constant CREATE_TABLE. */
    public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + 
        COLUMN_ID + " INTEGER PRIMARY KEY, " + 
        COLUMN_NAME_TAG_NAME + TEXT_TYPE + COMMA_SEP +
        COLUMN_NAME_LAST_USED + TEXT_TYPE +     
          " )";
    
    /** The Constant DROP_TABLE. */
    public static final String DROP_TABLE = "DROP TABLE IF EXISTS " + TABLE_NAME;
  }
  
  /**
   * The Class PomodorosTagsTable.
   * Defines fields of database's table "pomodorostags".
   */
  public static abstract class PomodorosTagsTable implements BaseColumns
  {
    
    /** The Constant TABLE_NAME. */
    public static final String TABLE_NAME = "pomodorostags";
    
    /** The Constant COLUMN_NAME_POMODORO_ID. */
    public static final String COLUMN_NAME_POMODORO_ID = "pomodoroid";
    
    /** The Constant COLUMN_NAME_TAG_ID. */
    public static final String COLUMN_NAME_TAG_ID = "tagid";
    
    /** The Constant CREATE_TABLE. */
    public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + 
        COLUMN_ID + " INTEGER PRIMARY KEY, " + 
        COLUMN_NAME_POMODORO_ID + INT_TYPE + COMMA_SEP +
        COLUMN_NAME_TAG_ID + INT_TYPE +    
          " )";
    
    /** The Constant DROP_TABLE. */
    public static final String DROP_TABLE = "DROP TABLE IF EXISTS " + TABLE_NAME;
  }
}




Java Source Code List

com.example.pomodorotimer.About.java
com.example.pomodorotimer.DropboxLink.java
com.example.pomodorotimer.MainActivity.java
com.example.pomodorotimer.PomodoroClass.java
com.example.pomodorotimer.PomodoroContentProvider.java
com.example.pomodorotimer.PomodoroDetails.java
com.example.pomodorotimer.PomodoroEdit.java
com.example.pomodorotimer.PomodoroList.java
com.example.pomodorotimer.PomodoroTimerDBContract.java
com.example.pomodorotimer.PomodoroTimerDBHelper.java
com.example.pomodorotimer.PomodorosTagClass.java
com.example.pomodorotimer.SettingsActivity.java
com.example.pomodorotimer.TagClass.java
com.example.pomodorotimer.TagDetails.java
com.example.pomodorotimer.TagEdit.java
com.example.pomodorotimer.TagList.java