Android Open Source - sqlite-orm Dummy For Tests Activity






From Project

Back to project page sqlite-orm.

License

The source code is released under:

Apache License

If you think the Android project sqlite-orm 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.orm.sqlite;
/*from   w  w  w.j  a  v a 2 s  . co m*/
import com.orm.sqlite.example.ExampleDataAccess;

import android.os.Bundle;
import android.app.Activity;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.view.Menu;

public class DummyForTestsActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_dummy_for_tests);
    new ExampleDataAccess(new SQLiteOpenHelper(this, "dummy", null, 1) {

      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

      }

      @Override
      public void onCreate(SQLiteDatabase db) {
        db.execSQL(ExampleDataAccess.DATABASE_CREATE);
      }
    });
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.dummy_for_tests, menu);
    return true;
  }

}




Java Source Code List

com.orm.sqlite.BaseDataAccess.java
com.orm.sqlite.DummyForTestsActivity.java
com.orm.sqlite.IBaseDataAccess.java
com.orm.sqlite.example.ExampleDataAccess.java
com.orm.sqlite.example.Example.java
com.orm.sqlite.generator.DataAccessGenerator.java
com.orm.sqlite.util.Tuple.java