Search in sources :

Example 46 with DataSourceOptions

use of com.abubusoft.kripton.android.sqlite.DataSourceOptions in project kripton by xcesco.

the class BindDummy01DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindDummy01DataSource instance() {
    BindDummy01DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(true).log(true).build();
                instance = result = new BindDummy01DataSource(options);
                SQLiteDatabase database = instance.openWritableDatabase();
                try {
                } catch (Throwable e) {
                    Logger.error(e.getMessage());
                    e.printStackTrace();
                } finally {
                    instance.close();
                }
            }
        }
    }
    return result;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) DataSourceOptions(com.abubusoft.kripton.android.sqlite.DataSourceOptions)

Example 47 with DataSourceOptions

use of com.abubusoft.kripton.android.sqlite.DataSourceOptions in project kripton by xcesco.

the class BindPerson1DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindPerson1DataSource instance() {
    BindPerson1DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindPerson1DataSource(options);
                SQLiteDatabase database = instance.openWritableDatabase();
                try {
                } catch (Throwable e) {
                    Logger.error(e.getMessage());
                    e.printStackTrace();
                } finally {
                    instance.close();
                }
            }
        }
    }
    return result;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) DataSourceOptions(com.abubusoft.kripton.android.sqlite.DataSourceOptions)

Example 48 with DataSourceOptions

use of com.abubusoft.kripton.android.sqlite.DataSourceOptions in project kripton by xcesco.

the class BindPerson3DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindPerson3DataSource instance() {
    BindPerson3DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindPerson3DataSource(options);
                SQLiteDatabase database = instance.openWritableDatabase();
                try {
                } catch (Throwable e) {
                    Logger.error(e.getMessage());
                    e.printStackTrace();
                } finally {
                    instance.close();
                }
            }
        }
    }
    return result;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) DataSourceOptions(com.abubusoft.kripton.android.sqlite.DataSourceOptions)

Example 49 with DataSourceOptions

use of com.abubusoft.kripton.android.sqlite.DataSourceOptions in project kripton by xcesco.

the class BindPerson4DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindPerson4DataSource instance() {
    BindPerson4DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindPerson4DataSource(options);
                SQLiteDatabase database = instance.openWritableDatabase();
                try {
                } catch (Throwable e) {
                    Logger.error(e.getMessage());
                    e.printStackTrace();
                } finally {
                    instance.close();
                }
            }
        }
    }
    return result;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) DataSourceOptions(com.abubusoft.kripton.android.sqlite.DataSourceOptions)

Example 50 with DataSourceOptions

use of com.abubusoft.kripton.android.sqlite.DataSourceOptions in project kripton by xcesco.

the class BindPersonCirtyErr3DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindPersonCirtyErr3DataSource instance() {
    BindPersonCirtyErr3DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindPersonCirtyErr3DataSource(options);
                SQLiteDatabase database = instance.openWritableDatabase();
                try {
                } catch (Throwable e) {
                    Logger.error(e.getMessage());
                    e.printStackTrace();
                } finally {
                    instance.close();
                }
            }
        }
    }
    return result;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) DataSourceOptions(com.abubusoft.kripton.android.sqlite.DataSourceOptions)

Aggregations

SQLiteDatabase (android.database.sqlite.SQLiteDatabase)117 DataSourceOptions (com.abubusoft.kripton.android.sqlite.DataSourceOptions)117