本文整理汇总了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()
);
}
示例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);
}
示例3: get
import com.parse.ParseObject; //导入方法依赖的package包/类
public static boolean get(ParseObject parseObject, String key, Boolean defValue) {
return parseObject.getBoolean(key);
}