Android Open Source - sensor-supervisor D B Contract






From Project

Back to project page sensor-supervisor.

License

The source code is released under:

GNU General Public License

If you think the Android project sensor-supervisor 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.thirdi.sensorsupervisor;
//www  .  j  av a2 s  .  c  o m
import android.provider.BaseColumns;

public final class DBContract {
  private static final String TEXT_TYPE = " TEXT";
  private static final String REAL_TYPE = " REAL";
  private static final String COMMA_SEP = ",";
  protected static final String SQL_CREATE_ENTRIES = 
    "CREATE TABLE " + DBEntry.TABLE_NAME + " (" +
      DBEntry._ID + " INTEGER PRIMARY KEY" + COMMA_SEP +
      DBEntry.COLUMN_NAME_SENSOR_ID + TEXT_TYPE + COMMA_SEP +
      DBEntry.COLUMN_NAME_SENSOR_NAME + TEXT_TYPE + COMMA_SEP +
      DBEntry.COLUMN_NAME_VALUE_X + REAL_TYPE + COMMA_SEP +
      DBEntry.COLUMN_NAME_VALUE_Y + REAL_TYPE + COMMA_SEP +
      DBEntry.COLUMN_NAME_VALUE_Z + REAL_TYPE + " )";
  
  protected static final String SQL_DELETE_ENTRIES =
      "DROP TABLE IF EXISTS " + DBEntry.TABLE_NAME;

  //To prevent accidental instantiation, empty constructor is required.
  public DBContract() {}

  /* Inner class that defines the table contents */
  public static abstract class DBEntry implements BaseColumns {
    public static final String TABLE_NAME = "sensor_data";
    public static final String COLUMN_NAME_SENSOR_ID = "sensorid";
    public static final String COLUMN_NAME_SENSOR_NAME = "sensorname";
    public static final String COLUMN_NAME_VALUE_X = "valuex";
    public static final String COLUMN_NAME_VALUE_Y = "valuey";
    public static final String COLUMN_NAME_VALUE_Z = "valuez";
  }
}




Java Source Code List

com.thirdi.sensorsupervisor.AudioFragment.java
com.thirdi.sensorsupervisor.CameraFragment.java
com.thirdi.sensorsupervisor.CameraPreview.java
com.thirdi.sensorsupervisor.DBContract.java
com.thirdi.sensorsupervisor.DBHelper.java
com.thirdi.sensorsupervisor.DatabaseFragment.java
com.thirdi.sensorsupervisor.FileHelper.java
com.thirdi.sensorsupervisor.GPSFragment.java
com.thirdi.sensorsupervisor.MainActivity.java
com.thirdi.sensorsupervisor.MediaFragment.java
com.thirdi.sensorsupervisor.NavigationDrawerFragment.java
com.thirdi.sensorsupervisor.NetworkFragment.java
com.thirdi.sensorsupervisor.SensorFragment.java
com.thirdi.sensorsupervisor.SettingsFragment.java
com.thirdi.sensorsupervisor.WifiAdapter.java
com.thirdi.sensorsupervisor.maps.java