Android Open Source - cnBeta Base D B Helper






From Project

Back to project page cnBeta.

License

The source code is released under:

Apache License

If you think the Android project cnBeta 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.guest.cnbeta.database;
/*w  ww . java  2s  .co m*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class BaseDBHelper extends SQLiteOpenHelper {

  public BaseDBHelper(Context context, String name, CursorFactory factory,
      int version) {
    super(context, name, factory, version);
  }

  @Override
  public void onCreate(SQLiteDatabase db) {
    db.execSQL("CREATE TABLE 'article' ( 'articleid' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'fromid' VARCHAR ( 50 ) NOT NULL , 'title' VARCHAR ( 255 ) NOT NULL , 'info' TEXT, 'avatar' VARCHAR ( 255 ) NOT NULL ) ;");
    db.execSQL("CREATE UNIQUE INDEX article_fromid ON 'article'('fromid');");
  }

  @Override
  public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
    // TODO Auto-generated method stub
    
  }
}




Java Source Code List

.ArticleActivity.java
.ArticleListService.java
.ArticleService.java
.Article.java
.CommentActivity.java
.CommentService.java
.Comment.java
.LoadSourceInterface.java
.LoadSource.java
.MainActivity.java
.PostCommentActivity.java
.Util.java
com.guest.cnbeta.FirstActivity.java
com.guest.cnbeta.SettingsActivity.java
com.guest.cnbeta.database.ArticleDB.java
com.guest.cnbeta.database.BaseDBHelper.java
com.guest.cnbeta.database.BaseDB.java
com.guest.cnbeta.loadsource.BaseLoadSource.java
com.guest.cnbeta.module.Avatar.java
com.guest.cnbeta.service.AvatarListService.java
com.guest.cnbeta.service.BaseService.java
com.guest.cnbeta.util.BaseApplication.java
com.guest.cnbeta.util.DataEngine.java
com.guest.cnbeta.util.FlingGallery.java
com.guest.cnbeta.util.NetworkStatusReceiver.java
com.guest.cnbeta.util.PullToRefreshListView.java
com.guest.cnbeta.util.ScaleAnimationHelper.java
com.guest.cnbeta.util.T.java