Search in sources :

Example 11 with DataSourceOptions

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

the class BindBeanDataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindBeanDataSource instance() {
    BindBeanDataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindBeanDataSource(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 12 with DataSourceOptions

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

the class BindBeanDataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindBeanDataSource instance() {
    BindBeanDataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindBeanDataSource(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 13 with DataSourceOptions

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

the class BindBeanDataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindBeanDataSource instance() {
    BindBeanDataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindBeanDataSource(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 14 with DataSourceOptions

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

the class BindDummy08DataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindDummy08DataSource instance() {
    BindDummy08DataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindDummy08DataSource(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 15 with DataSourceOptions

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

the class BindByteDataSource method instance.

/**
 * <p>Retrieve instance.</p>
 */
public static BindByteDataSource instance() {
    BindByteDataSource result = instance;
    if (result == null) {
        synchronized (mutex) {
            result = instance;
            if (result == null) {
                DataSourceOptions options = DataSourceOptions.builder().inMemory(false).log(true).build();
                instance = result = new BindByteDataSource(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