title: How to use a contract class in android?
body: <p>I'm a little bit confused because I don't know how I should interpret the tutorial here: <a href="http://developer.android.com/training/basics/data-storage/databases.html#DbHelper">http://developer.android.com/training/basics/data-storage/databases.html#DbHelper</a></p>
  
  <p>My code until now looks like this:</p>
  
  <pre><code>public final class DatabaseContract {
  // To prevent someone from accidentally instantiating the contract class,
  // give it an empty constructor.
  public DatabaseContract() {}
  
  public static abstract class Table1 implements BaseColumns {
      public static final String TABLE_NAME       = "nameOfTable";
      public static final String COLUMN_NAME_COL1 = "column1";
      public static final String COLUMN_NAME_COL2 = "column2";
      public static final String COLUMN_NAME_COL3 = "column3";
  }
  
  public class DatabaseHelper extends SQLiteOpenHelper {
      // If you change the database schema, you must increment the database version.
      public static final  int    DATABASE_VERSION   = 1;
      public static final  String DATABASE_NAME      = "database.db";
      private static final String TEXT_TYPE          = " TEXT";
      private static final String COMMA_SEP          = ",";
      private static final String SQL_CREATE_ENTRIES = "CREATE TABLE " +
              Table1.TABLE_NAME + " (" +
              Table1._ID + " INTEGER PRIMARY KEY," +
              Table1.COLUMN_NAME_COL1 + TEXT_TYPE + COMMA_SEP +
              Table1.COLUMN_NAME_COL2 + TEXT_TYPE + COMMA_SEP +
              Table1.COLUMN_NAME_COL3 + TEXT_TYPE + COMMA_SEP + " )";
      private static final String SQL_DELETE_ALL_ENTRIES = "DROP TABLE IF EXISTS " + Table1.TABLE_NAME;
  
      public DatabaseHelper(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
      }
  
      // Method is called during creation of the database
      @Override
      public void onCreate(SQLiteDatabase db) {
          db.execSQL(SQL_CREATE_ENTRIES);
      }
  
      // Method is called during an upgrade of the database
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          Log.w(DatabaseHelper.class.getName(), "Upgrading database from version " + oldVersion + " to " + newVersion + ", which will destroy all old data");
  
          db.execSQL(SQL_DELETE_ALL_ENTRIES);
          onCreate(db);
      }
  }
  }
  </code></pre>
  
  <p>Did I interpreted it right or have the first 6 variables in the Helper class to be outside in the Contract class?
  Or should the Helper Class not be a inner class of the contract class? </p>
  
  <p>Hope you can help me</p>