Android Open Source - async_loader S Q Lite Insert Task






From Project

Back to project page async_loader.

License

The source code is released under:

Apache License

If you think the Android project async_loader 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.beinggreenrobot.content.loaderasync;
// ww  w. j av a2 s  . co m
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;

@Deprecated
public class SQLiteInsertTask
  extends AsyncTask<Void, Void, Exception> {
  SQLiteDatabase db;
  String table;
  String nullColumnHack;
  ContentValues values;
  
  public SQLiteInsertTask(SQLiteDatabase db, String table,
                           String nullColumnHack,
                           ContentValues values) {
    this.db=db;
    this.table=table;
    this.nullColumnHack=nullColumnHack;
    this.values=values;
  }
  
  @Override
  protected Exception doInBackground(Void... params) {
    try {
      db.insert(table, nullColumnHack, values);
    }
    catch (Exception e) {
      return(e);
    }
    
    return(null);
  }
}




Java Source Code List

com.beinggreenrobot.content.loaderasync.AbstractCursorLoader.java
com.beinggreenrobot.content.loaderasync.ContentChangingTask.java
com.beinggreenrobot.content.loaderasync.SQLiteCursorLoader.java
com.beinggreenrobot.content.loaderasync.SQLiteDeleteTask.java
com.beinggreenrobot.content.loaderasync.SQLiteInsertTask.java
com.beinggreenrobot.content.loaderasync.SharedPreferencesLoader.java
com.beinggreenrobot.support.content.loaderasync.AbstractCursorLoader.java
com.beinggreenrobot.support.content.loaderasync.ContentChangingTask.java
com.beinggreenrobot.support.content.loaderasync.SQLiteCursorLoader.java
com.beinggreenrobot.support.content.loaderasync.SharedPreferencesLoader.java