当前位置: 首页>>代码示例>>Java>>正文


Java Dao.queryForEq方法代码示例

本文整理汇总了Java中com.j256.ormlite.dao.Dao.queryForEq方法的典型用法代码示例。如果您正苦于以下问题:Java Dao.queryForEq方法的具体用法?Java Dao.queryForEq怎么用?Java Dao.queryForEq使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.j256.ormlite.dao.Dao的用法示例。


在下文中一共展示了Dao.queryForEq方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkSuspectedApps

import com.j256.ormlite.dao.Dao; //导入方法依赖的package包/类
protected boolean checkSuspectedApps(String packageName) {
    boolean matched = true;
    if (!_settings.isAdvancedMode()) {
        try {
            Dao<SuspectedApp, Integer> suspectedAppDao = DatabaseHelper.getHelper(_context.getApplicationContext()).getSuspectedAppDao();
            List<SuspectedApp> res = suspectedAppDao.queryForEq("packageName", packageName);
            if (res.size() == 0) {
                Log.i(TAG, String.format("Skipping %s since not in suspected app list and is probably a FP", packageName));
                matched = false;
            } else {
                Log.d(TAG, String.format("Process %s found in suspected apps", packageName));
                matched = true;
            }
        } catch (SQLException e) {
            Log.e(TAG, String.format("SQL exception: %s", e.getMessage()));
            matched = false;
        }
    }
    return matched;
}
 
开发者ID:geeksonsecurity,项目名称:android-overlay-protection,代码行数:21,代码来源:AbstractDetectionEngine.java

示例2: onCreate

import com.j256.ormlite.dao.Dao; //导入方法依赖的package包/类
@Override
    public void onCreate() {
        super.onCreate();
//        This is here because onStart is not called when BIND_AUTO_CREATE is used
        mContext = this;
        localBroadcastManager = LocalBroadcastManager.getInstance(this);
        final OrmHandler ormHandler = OpenHelperManager.getHelper(this, OrmHandler.class);
        Dao<Track, String> dbTrack;
        try {
            dbTrack = ormHandler.getDao(Track.class);
            mTrackList = dbTrack.queryForAll();
            mBucketList = dbTrack.queryForEq("bucket", true);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
 
开发者ID:Circle-Of-Music-Makers,项目名称:com-android,代码行数:17,代码来源:MusicPlayerService.java

示例3: getBucketedTracks

import com.j256.ormlite.dao.Dao; //导入方法依赖的package包/类
public void getBucketedTracks() {
    bucketBool = true;
    OrmHandler orm = OpenHelperManager.getHelper(mContext, OrmHandler.class);
    try {
        Dao<Track, String> mTrack = orm.getDao(Track.class);
        mTrackList = mTrack.queryForEq("bucket", true);
    } catch (SQLException e) {
        e.printStackTrace();
    }
    OpenHelperManager.releaseHelper();
    notifyDataSetChanged();
}
 
开发者ID:Circle-Of-Music-Makers,项目名称:com-android,代码行数:13,代码来源:TracksAdapter.java


注:本文中的com.j256.ormlite.dao.Dao.queryForEq方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。