本文整理汇总了Java中com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper类的典型用法代码示例。如果您正苦于以下问题:Java OrmLiteSqliteOpenHelper类的具体用法?Java OrmLiteSqliteOpenHelper怎么用?Java OrmLiteSqliteOpenHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OrmLiteSqliteOpenHelper类属于com.j256.ormlite.android.apptools包,在下文中一共展示了OrmLiteSqliteOpenHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CDKDao
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
/**
* 构造函数
*
* @param helper
*/
@SuppressWarnings("unchecked")
public CDKDao(OrmLiteSqliteOpenHelper sqliteOpenHelper)
{
// this.mOpenHelper = SdkDbHelper.getDatabaseHelper(context);
this.mSqliteOpenHelper = sqliteOpenHelper;
Class<Model> modelClass = (Class<Model>) ((ParameterizedType) getClass().getGenericSuperclass())
.getActualTypeArguments()[0];
mRuntimeDao = mSqliteOpenHelper.getRuntimeExceptionDao(modelClass);
}
示例2: RockyDao
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
/**
* 构造函数
*
* @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);
}
示例3: ORMLoader
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
public ORMLoader(Context context, OrmLiteSqliteOpenHelper databaseHelper, PreparedQuery<T> query) throws Exception {
super(context);
if (databaseHelper == null) {
throw new Exception("Database Helper cannot be null");
}
if (query == null) {
throw new Exception("Query cannot be null");
}
mDatabaseHelper = databaseHelper;
mObserver = new ForceLoadContentObserver();
mQuery = query;
}
示例4: GoalsAsyncLoader
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
public GoalsAsyncLoader(Context context, OrmLiteSqliteOpenHelper helper, ListView listView,
GoalsListItemSelectedListener listener) {
try {
this.goalsDao = helper.getDao(Goal.class);
this.context = context;
this.finalView = listView;
this.listener = listener;
} catch (SQLException e) {
Log.e(APP_TAG,"Error retrieving dao for goals async loader. Failing app",e);
throw new ExceptionInInitializerError("Error initializing Goals Async Loader. " + e.getMessage());
}
}
示例5: GameRankingBiz
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
public GameRankingBiz(OrmLiteSqliteOpenHelper sqliteOpenHelper)
{
super(sqliteOpenHelper);
}
示例6: getHelperInternal
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
protected H getHelperInternal(Context context) {
OrmLiteSqliteOpenHelper newHelper = OpenHelperManager.getHelper(context);
logger.trace("{}: got new helper {} from OpenHelperManager", this, newHelper);
//noinspection unchecked
return (H) newHelper;
}
示例7: SyncHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
public SyncHelper(OrmLiteSqliteOpenHelper syncDatabaseHelper) {
this.dbHelper = syncDatabaseHelper;
}
示例8: createHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
@Override
protected OrmLiteSqliteOpenHelper createHelper() {
return new DefaultDatabaseHelper(getContext());
}
示例9: createHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
@Override
protected OrmLiteSqliteOpenHelper createHelper() {
return new TestDatabaseHelper(getContext());
}
示例10: AbstractOrmDatabaseRequest
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
public AbstractOrmDatabaseRequest(Context context,Class<? extends OrmLiteSqliteOpenHelper> helplerClass){
mContext=context;
this.helplerClass=helplerClass;
}
示例11: getHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
private OrmLiteSqliteOpenHelper getHelper(){
return OpenHelperManager.getHelper(mContext, helplerClass);
}
示例12: getHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private OrmLiteSqliteOpenHelper getHelper() {
OpenHelperManager.setOpenHelperClass(DatabaseHelper.class);
return OpenHelperManager.getHelper(getContext());
}
示例13: getSqliteOpenHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
/**
* 返回OrmLiteSqliteOpenHelper对象
*
* @return
*/
public OrmLiteSqliteOpenHelper getSqliteOpenHelper()
{
return mSqliteOpenHelper;
}
示例14: BaseBiz
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
/**
* 构造函数
*
* @param helper
*/
public BaseBiz(OrmLiteSqliteOpenHelper helper)
{
this.mOpenHelper = helper;
}
示例15: getDatabaseHelper
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; //导入依赖的package包/类
/**
* 返回DatabaseHelper对象
*
* @return
*/
public OrmLiteSqliteOpenHelper getDatabaseHelper()
{
return mOpenHelper;
}