Java Code Examples for com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper

The following examples show how to use com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper. These examples are extracted from open source projects. 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 Project: android-project-wo2b   Source File: RockyDao.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 构造函数
 * 
 * @param helper
 */
@SuppressWarnings("unchecked")
public RockyDao(OrmLiteSqliteOpenHelper sqliteOpenHelper)
{
	// this.mOpenHelper = SdkDbHelper.getDatabaseHelper(context);

	this.mSqliteOpenHelper = sqliteOpenHelper;
	Class<Model> modelClass = (Class<Model>) ((ParameterizedType) getClass().getGenericSuperclass())
			.getActualTypeArguments()[0];
	mRuntimeDao = mSqliteOpenHelper.getRuntimeExceptionDao(modelClass);
}
 
Example 2
public OrmLiteBaseAppCompatActivity(Class<? extends OrmLiteSqliteOpenHelper> helperClass) {
    this.helperClass = helperClass;
}
 
Example 3
Source Project: android-project-wo2b   Source File: GameRankingBiz.java    License: Apache License 2.0 4 votes vote down vote up
public GameRankingBiz(OrmLiteSqliteOpenHelper sqliteOpenHelper)
{
	super(sqliteOpenHelper);
}
 
Example 4
Source Project: DataSync   Source File: SyncHelper.java    License: Apache License 2.0 4 votes vote down vote up
public SyncHelper(OrmLiteSqliteOpenHelper syncDatabaseHelper) {
    this.dbHelper = syncDatabaseHelper;
}
 
Example 5
Source Project: android-atleap   Source File: DefaultProvider.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected OrmLiteSqliteOpenHelper createHelper() {
    return new DefaultDatabaseHelper(getContext());
}
 
Example 6
Source Project: android-atleap   Source File: TestProvider.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected OrmLiteSqliteOpenHelper createHelper() {
    return new TestDatabaseHelper(getContext());
}
 
Example 7
Source Project: android-project-wo2b   Source File: BaseBiz.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 构造函数
 * 
 * @param helper
 */
public BaseBiz(OrmLiteSqliteOpenHelper helper)
{
	this.mOpenHelper = helper;
}
 
Example 8
Source Project: android-project-wo2b   Source File: BaseBiz.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 返回DatabaseHelper对象
 * 
 * @return
 */
public OrmLiteSqliteOpenHelper getDatabaseHelper()
{
	return mOpenHelper;
}
 
Example 9
Source Project: android-project-wo2b   Source File: RockyDao.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 返回OrmLiteSqliteOpenHelper对象
 * 
 * @return
 */
public OrmLiteSqliteOpenHelper getSqliteOpenHelper()
{
	return mSqliteOpenHelper;
}