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


Java ParseObject.getBoolean方法代碼示例

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


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

示例1: getEventFromParseObject

import com.parse.ParseObject; //導入方法依賴的package包/類
public static Event getEventFromParseObject(@NonNull ParseObject parseObject){
    ParseGeoPoint location = parseObject.getParseGeoPoint(Event.LOCATION);
    ParseFile parseFile = parseObject.getParseFile(Event.IMAGE);
    return new Event(parseObject.getObjectId(),
            parseObject.getString(Event.TITLE),
            parseObject.getString(Event.DESCRIPTION),
            location != null? location.getLatitude() : Event.INVALID_LOCATION,
            location != null? location.getLongitude() : Event.INVALID_LOCATION,
            parseObject.getString(Event.LOCATION_SUMMARY),
            parseObject.getString(Event.LOCATION_DESCRIPTION),
            parseFile != null? parseFile.getUrl() : null,
            parseObject.getDate(Event.INITIAL_DATE),
            // If end date is null, set it as initial date, so we can use it in our order by
            parseObject.getDate(Event.END_DATE) != null? parseObject.getDate(Event.END_DATE) : parseObject.getDate(Event.INITIAL_DATE),
            parseObject.getInt(Event.TYPE),
            parseObject.getBoolean(Event.ENABLED),
            (parseObject.getNumber(Event.GOING) != null)? parseObject.getNumber(Event.GOING).longValue() : 0,
            parseObject.getString(Event.LINK_URL),
            parseObject.getString(Event.LINK_TEXT),
            parseObject.getUpdatedAt()
    );
}
 
開發者ID:LibertACAO,項目名稱:libertacao-android,代碼行數:23,代碼來源:ParserDtoManager.java

示例2: doBatchCrudRun

import com.parse.ParseObject; //導入方法依賴的package包/類
@Override
protected void doBatchCrudRun(int count) throws Exception {
    List<ParseObject> list = new ArrayList<>(count);
    for (int i = 0; i < count; i++) {
        list.add(createEntity(i));
    }

    startClock();
    ParseObject.pinAll(list);
    stopClock(Benchmark.Type.BATCH_CREATE);

    startClock();
    ParseObject.pinAll(list);
    stopClock(Benchmark.Type.BATCH_UPDATE);

    startClock();
    List<ParseObject> reloaded = ParseQuery.getQuery("SimpleEntity")
            .fromLocalDatastore()
            .find();
    stopClock(Benchmark.Type.BATCH_READ);

    startClock();
    for (int i = 0; i < reloaded.size(); i++) {
        ParseObject entity = reloaded.get(i);
        entity.getBoolean("simpleBoolean");
        entity.getInt("simpleByte");
        entity.getInt("simpleShort");
        entity.getInt("simpleInt");
        entity.getLong("simpleLong");
        entity.getDouble("simpleFloat");
        entity.getDouble("simpleDouble");
        entity.getString("simpleString");
        entity.getBytes("simpleByteArray");
    }
    stopClock(Benchmark.Type.BATCH_ACCESS);

    startClock();
    deleteAll();
    stopClock(Benchmark.Type.BATCH_DELETE);
}
 
開發者ID:greenrobot,項目名稱:android-database-performance,代碼行數:41,代碼來源:PerfTestParse.java

示例3: get

import com.parse.ParseObject; //導入方法依賴的package包/類
public static boolean get(ParseObject parseObject, String key, Boolean defValue) {
    return parseObject.getBoolean(key);
}
 
開發者ID:yongjhih,項目名稱:auto-parse,代碼行數:4,代碼來源:AutoParseHelper.java


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