Java Code Examples for com.raizlabs.android.dbflow.config.FlowManager#initModule()

The following examples show how to use com.raizlabs.android.dbflow.config.FlowManager#initModule() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TyApplication.java    From tysq-android with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 初始化数据库
 */
private void initDb() {
    FlowManager
            .init(FlowConfig.builder(this)
                    .addDatabaseConfig(
                            DatabaseConfig.builder(TyDB.class)
                                    .databaseName(TyDB.NAME)
                                    .build()
                    )
                    .build());

    FlowManager.initModule(TyGeneratedDatabaseHolder.class);
}
 
Example 2
Source File: JerryDownloadConfig.java    From tysq-android with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 初始化
 *
 * @param context
 */
public static void init(Context context) {
    FlowManager
            .init(FlowConfig.builder(context)
                    .addDatabaseConfig(
                            DatabaseConfig.builder(DownloadDB.class)
                                    .databaseName(DownloadDB.NAME)
                                    .build()
                    )
                    .build());

    FlowManager.initModule(JerryMultiDownloadGeneratedDatabaseHolder.class);
}
 
Example 3
Source File: BaseContentProvider.java    From Meteorite with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onCreate() {
    // If this is a module, then we need to initialize the module as part
    // of the creation process. We can assume the framework has been general
    // framework has been initialized.
    if (moduleClass != null) {
        FlowManager.initModule(moduleClass);
    } else if (getContext() != null) {
        FlowManager.init(getContext());
    }

    return true;
}