當前位置: 首頁>>代碼示例>>Java>>正文


Java FlowManager.destroy方法代碼示例

本文整理匯總了Java中com.raizlabs.android.dbflow.config.FlowManager.destroy方法的典型用法代碼示例。如果您正苦於以下問題:Java FlowManager.destroy方法的具體用法?Java FlowManager.destroy怎麽用?Java FlowManager.destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.raizlabs.android.dbflow.config.FlowManager的用法示例。


在下文中一共展示了FlowManager.destroy方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: prepare

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
public static TestComponent prepare(App app) {
    FlowManager.destroy();
    resetSingleton(FlowManager.class, "mDatabaseHolder");
    ApplicationModule appModule = new ApplicationModule(app) {
        @Override
        public EventBus eventBus() {
            return new LoggingBus();
        }
        @Provides
        @Singleton
        public JobManager jobManager() {
            JobManager mock = mock(JobManager.class);
            when(mock.addJob(any(Job.class))).thenReturn(1L);
            return mock;
        }
    };
    TestComponent testComponent = DaggerTestComponent.builder()
            .testApplicationModule(new TestApplicationModule())
            .applicationModule(appModule)
            .build();
    testComponent.appContext().deleteDatabase(DemoDatabase.NAME + ".db");
    FlowManager.init(app);
    testComponent.feedModel().clear();
    testComponent.loggingBus().clear();
    return testComponent;
}
 
開發者ID:yigit,項目名稱:dev-summit-architecture-demo,代碼行數:27,代碼來源:TestUtil.java

示例2: teardown

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@After
public void teardown() {
    executors.shutdown();

    // DBFlow doesn't automatically close its database handle when a test ends.
    // https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
    FlowManager.destroy();
}
 
開發者ID:aarmea,項目名稱:noise,代碼行數:9,代碼來源:StreamSyncTest.java

示例3: dispose

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
public static void dispose() {
    // ThreadPool
    stopThreadPool();

    // Network
    stopRequestQueue();

    // DB Flow destroy
    FlowManager.destroy();
    APPLICATION = null;
}
 
開發者ID:qiujuer,項目名稱:UPMiss,代碼行數:12,代碼來源:Model.java

示例4: pullFromDB

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
private void pullFromDB(Context context,
        InputStream inputStream) throws IOException {
    Log.d(TAG, "Copy Database from assets started");
    FlowManager.destroy();
    copyDBFromAssets(inputStream);
    reinitializeDbFlowDatabases(context);
    Log.d(TAG, "Copy Database from assets finished");
}
 
開發者ID:EyeSeeTea,項目名稱:malariapp,代碼行數:9,代碼來源:LocalPullController.java

示例5: tearDown

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public void tearDown() throws Exception {
    FlowManager.destroy();
    getTargetContext().deleteDatabase(FlowDatabase.NAME + ".db");

    super.tearDown();
}
 
開發者ID:greenrobot,項目名稱:android-database-performance,代碼行數:8,代碼來源:PerfTestDbFlow.java

示例6: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public void onTerminate() {
    super.onTerminate();
    FlowManager.destroy();
    application = null;
    context = null;
}
 
開發者ID:markzhai,項目名稱:LyricHere,代碼行數:8,代碼來源:LHApplication.java

示例7: getResponseObject

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public TrackerExportResponse getResponseObject() {
    FlowManager.init(this);
    List<TrackedEntityInstance> trackedEntityInstances = new Select().from(TrackedEntityInstance.class).queryList();
    List<Enrollment> enrollments = new Select().from(Enrollment.class).queryList();
    List<Event> events = new Select().from(Event.class).queryList();
    FlowManager.destroy();
    return TrackerExportResponse.build(trackedEntityInstances, enrollments, events);
}
 
開發者ID:dhis2,項目名稱:dhis2-android-trackercapture,代碼行數:10,代碼來源:TrackerExportService.java

示例8: DBTearDown

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
private void DBTearDown() {
    FlowManager.destroy();
}
 
開發者ID:micromasterandroid,項目名稱:androidadvanced,代碼行數:4,代碼來源:FacebookRecipesApp.java

示例9: teardown

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@After
public void teardown() {
    // DBFlow doesn't automatically close its database handle when a test ends.
    // https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
    FlowManager.destroy();
}
 
開發者ID:aarmea,項目名稱:noise,代碼行數:7,代碼來源:UnknownMessageTest.java

示例10: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public void onTerminate() {
    FlowManager.destroy();
    super.onTerminate();
}
 
開發者ID:roadhouse-dev,項目名稱:RxDbflow,代碼行數:6,代碼來源:ExampleApplication.java

示例11: tearDown

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@After
public void tearDown() throws Exception {
    FlowManager.getDatabase(AppDatabase.NAME).reset(RuntimeEnvironment.application);
    FlowManager.destroy();
}
 
開發者ID:setiawanp,項目名稱:sunny-reader,代碼行數:6,代碼來源:HackerNewsDiskStoreTest.java

示例12: after

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@After
public void after() {
  scroballDB.clear();
  FlowManager.destroy();
}
 
開發者ID:peterjosling,項目名稱:scroball,代碼行數:6,代碼來源:ScroballDBTest.java

示例13: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public void onTerminate() {
    super.onTerminate();            //必須先調用父類的同名方法
    FlowManager.destroy();          //釋放DbFlow這個第三方數據庫使用的所有資源
}
 
開發者ID:rorschach,項目名稱:Diary,代碼行數:6,代碼來源:MyApplication.java

示例14: freeDatabase

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
private void freeDatabase() {
  FlowManager.destroy();
}
 
開發者ID:tommus,項目名稱:rabbitmq-management-android,代碼行數:4,代碼來源:RabbitMqManagementApplication.java

示例15: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //導入方法依賴的package包/類
@Override
public void onTerminate() {
    super.onTerminate();
    FlowManager.destroy();
}
 
開發者ID:EyeSeeTea,項目名稱:EDSApp,代碼行數:6,代碼來源:EyeSeeTeaApplication.java


注:本文中的com.raizlabs.android.dbflow.config.FlowManager.destroy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。