當前位置: 首頁>>代碼示例>>Java>>正文


Java Where.ge方法代碼示例

本文整理匯總了Java中com.j256.ormlite.stmt.Where.ge方法的典型用法代碼示例。如果您正苦於以下問題:Java Where.ge方法的具體用法?Java Where.ge怎麽用?Java Where.ge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.j256.ormlite.stmt.Where的用法示例。


在下文中一共展示了Where.ge方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTreatmentDataFromTime

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public List<Treatment> getTreatmentDataFromTime(long mills, boolean ascending) {
    try {
        Dao<Treatment, Long> daoTreatments = getDaoTreatments();
        List<Treatment> treatments;
        QueryBuilder<Treatment, Long> queryBuilder = daoTreatments.queryBuilder();
        queryBuilder.orderBy("date", ascending);
        Where where = queryBuilder.where();
        where.ge("date", mills);
        PreparedQuery<Treatment> preparedQuery = queryBuilder.prepare();
        treatments = daoTreatments.query(preparedQuery);
        return treatments;
    } catch (SQLException e) {
        log.error("Unhandled exception", e);
    }
    return new ArrayList<Treatment>();
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:17,代碼來源:DatabaseHelper.java

示例2: getTemptargetsDataFromTime

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public List<TempTarget> getTemptargetsDataFromTime(long mills, boolean ascending) {
    try {
        Dao<TempTarget, Long> daoTempTargets = getDaoTempTargets();
        List<TempTarget> tempTargets;
        QueryBuilder<TempTarget, Long> queryBuilder = daoTempTargets.queryBuilder();
        queryBuilder.orderBy("date", ascending);
        Where where = queryBuilder.where();
        where.ge("date", mills);
        PreparedQuery<TempTarget> preparedQuery = queryBuilder.prepare();
        tempTargets = daoTempTargets.query(preparedQuery);
        return tempTargets;
    } catch (SQLException e) {
        log.error("Unhandled exception", e);
    }
    return new ArrayList<TempTarget>();
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:17,代碼來源:DatabaseHelper.java

示例3: updateDanaRHistoryRecordId

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public void updateDanaRHistoryRecordId(JSONObject trJson) {
    try {
        QueryBuilder<DanaRHistoryRecord, String> queryBuilder = getDaoDanaRHistory().queryBuilder();
        Where where = queryBuilder.where();
        where.ge("bytes", trJson.get(DanaRNSHistorySync.DANARSIGNATURE));
        PreparedQuery<DanaRHistoryRecord> preparedQuery = queryBuilder.prepare();
        List<DanaRHistoryRecord> list = getDaoDanaRHistory().query(preparedQuery);
        if (list.size() == 0) {
            // Record does not exists. Ignore
        } else if (list.size() == 1) {
            DanaRHistoryRecord record = list.get(0);
            if (record._id == null || !record._id.equals(trJson.getString("_id"))) {
                if (Config.logIncommingData)
                    log.debug("Updating _id in DanaR history database: " + trJson.getString("_id"));
                record._id = trJson.getString("_id");
                getDaoDanaRHistory().update(record);
            } else {
                // already set
            }
        }
    } catch (SQLException | JSONException e) {
        log.error("Unhandled exception", e);
    }
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:25,代碼來源:DatabaseHelper.java

示例4: getTemporaryBasalsDataFromTime

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public List<TemporaryBasal> getTemporaryBasalsDataFromTime(long mills, boolean ascending) {
    try {
        List<TemporaryBasal> tempbasals;
        QueryBuilder<TemporaryBasal, Long> queryBuilder = getDaoTemporaryBasal().queryBuilder();
        queryBuilder.orderBy("date", ascending);
        Where where = queryBuilder.where();
        where.ge("date", mills);
        PreparedQuery<TemporaryBasal> preparedQuery = queryBuilder.prepare();
        tempbasals = getDaoTemporaryBasal().query(preparedQuery);
        return tempbasals;
    } catch (SQLException e) {
        log.error("Unhandled exception", e);
    }
    return new ArrayList<TemporaryBasal>();
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:16,代碼來源:DatabaseHelper.java

示例5: getExtendedBolusDataFromTime

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public List<ExtendedBolus> getExtendedBolusDataFromTime(long mills, boolean ascending) {
    try {
        List<ExtendedBolus> extendedBoluses;
        QueryBuilder<ExtendedBolus, Long> queryBuilder = getDaoExtendedBolus().queryBuilder();
        queryBuilder.orderBy("date", ascending);
        Where where = queryBuilder.where();
        where.ge("date", mills);
        PreparedQuery<ExtendedBolus> preparedQuery = queryBuilder.prepare();
        extendedBoluses = getDaoExtendedBolus().query(preparedQuery);
        return extendedBoluses;
    } catch (SQLException e) {
        log.error("Unhandled exception", e);
    }
    return new ArrayList<ExtendedBolus>();
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:16,代碼來源:DatabaseHelper.java

示例6: getCareportalEventsFromTime

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
public List<CareportalEvent> getCareportalEventsFromTime(long mills, boolean ascending) {
    try {
        List<CareportalEvent> careportalEvents;
        QueryBuilder<CareportalEvent, Long> queryBuilder = getDaoCareportalEvents().queryBuilder();
        queryBuilder.orderBy("date", ascending);
        Where where = queryBuilder.where();
        where.ge("date", mills);
        PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
        careportalEvents = getDaoCareportalEvents().query(preparedQuery);
        return careportalEvents;
    } catch (SQLException e) {
        log.error("Unhandled exception", e);
    }
    return new ArrayList<CareportalEvent>();
}
 
開發者ID:MilosKozak,項目名稱:AndroidAPS,代碼行數:16,代碼來源:DatabaseHelper.java

示例7: and

import com.j256.ormlite.stmt.Where; //導入方法依賴的package包/類
@Override
public void and(Where<? extends Temporal, Long> where) throws SQLException {
	where.and();

	if (start != null && end != null) {
		where.between(columnName, start, end);
	} else if (start != null) {
		where.ge(columnName, start);
	} else {
		where.lt(columnName, end);
	}
}
 
開發者ID:ngageoint,項目名稱:mage-android,代碼行數:13,代碼來源:DateTimeFilter.java


注:本文中的com.j256.ormlite.stmt.Where.ge方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。