title: databasehandler with inner classes
body: <p>I've tried to arranged my DatabaseHandler(outer class) so that every table in my database will be under one inner class. my code looks something like this;</p>
  
  <p>public class DatabaseHandler extends SQLiteOpenHelper{</p>
  
  <pre><code>public static final int DATABASE_VERSION = 1;
  
  public static final String DATABASE_NAME = "databaseName";
  
  private static SQLiteDatabase db;
  
  private static final String CUSTOMERS_TABLE_NAME = "customers",...;
  private static final String USERS_TABLE_NAME = "users",...;
  private static final String PRODUCTS_TABLE_NAME = "products",...;
  private static final String FORMS_TABLE_NAME = "forms",...;
  
  public DatabaseHandler(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }
  
  @Override
  public void onCreate(SQLiteDatabase db) {
      String SQL_STRING = "CREATE TABLE " + CUSTOMERS_TABLE_NAME + "(" +
      .
      .
      .
      db.execSQL(SQL_STRING);
      SQL_STRING = "CREATE TABLE " + USERS_TABLE_NAME + "(" +
      .
      .
      .
      db.execSQL(SQL_STRING);
      SQL_STRING = "CREATE TABLE " + PRODUCTS_TABLE_NAME + "(" +
      .
      .
      .
      db.execSQL(SQL_STRING);
      SQL_STRING = "CREATE TABLE " + FORMS_TABLE_NAME + "(" +
      .
      .
      .
      db.execSQL(SQL_STRING);
  }
  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      db.execSQL("DROP TABLE IF EXISTS " + CUSTOMERS_TABLE_NAME+" AND    "+USERS_TABLE_NAME+" AND "+PRODUCTS_TABLE_NAME+" AND "+FORMS_TABLE_NAME);
  
      onCreate(db);
      }
  }
  </code></pre>
  
  <p>and within this class i want 4 inner classes that are represent the 4 database tables. every innerclass will hava CRUD methods. inner class for exaple;</p>
  
  <pre><code>public class customersHandler{
         public void createCustomer(customerStructure customer){
             .
             .
             .
          }
          public customerStructure getCustomer(String customerName){
             .
             .
             .
          }
          public void deleteCustomer(customerStructure customer){
             .
             .
             .
          }
          public int updateCustomer(customerStructure customer){
             .
             .
             .
          }
          .
          .
          .
  }
  </code></pre>
  
  <p>what should i do? i declare in the main activity like this:</p>
  
  <pre><code>public class MainActivity extande ActionBarActivity(){
  
  DatabaseHandler db;
  DatabaseHandler.customersHandler CH;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) { 
      super.onCreate(savedInstanceState); 
      setContentView(R.layout.activity_main); 
  
      db=new DatabaseHandler(getApplicationContext());
      CH=db.new customersHandler();
      }
  }
  </code></pre>
  
  <p>thats correct? what's wrong? </p>