Back to project page android-mvc-framework.
The source code is released under:
Apache License
If you think the Android project android-mvc-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android_mvc.sample_project.db.dao.todo; /* w w w .j av a2 s. com*/ import com.android_mvc.framework.db.dao.BaseDBDAO; import com.android_mvc.framework.db.transaction.todo.TxnListener; import com.android_mvc.framework.db.transaction.todo.TxnScope; import android.database.sqlite.SQLiteDatabase; /** * ????????????????????????????????????????????????????DAO? * @author id:language_and_engineering * */ public class HogeDAO extends BaseDBDAO { private SQLiteDatabase db; /** * DB???????????1 */ private void insert1( TxnScope upper_scope ) { new TxnScope( db, upper_scope ){ @Override protected void handleDB() { // ? insert2( getScope() ); } }.execute( new TxnListener(){ @Override public void onComplete() { // } @Override public void onError( Exception e ) { // } }); } /** * DB???????????2 */ private void insert2( TxnScope upper_scope ) { new TxnScope( db, upper_scope ){ @Override protected void handleDB() { // ? //insertX( getScope() ); } }.execute(); } /** * ????? */ public void main(){ new TxnScope( db, null ){ @Override protected void handleDB() { insert1( getScope() ); } }.execute(); } }