當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。