本文整理了Java中cn.bmob.v3.BmobQuery.addWhereLessThanOrEqualTo()
方法的一些代码示例,展示了BmobQuery.addWhereLessThanOrEqualTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BmobQuery.addWhereLessThanOrEqualTo()
方法的具体详情如下:
包路径:cn.bmob.v3.BmobQuery
类名称:BmobQuery
方法名:addWhereLessThanOrEqualTo
BmobQuery.addWhereLessThanOrEqualTo介绍
暂无
代码示例
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* sequence小于等于10的类别
*/
private void lessEqual() {
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.addWhereLessThanOrEqualTo("sequence", 10);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnEqual, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnEqual, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* sequence小于等于10的类别
*/
private void lessEqual() {
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.addWhereLessThanOrEqualTo("sequence", 10);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnEqual, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnEqual, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 某个时间及以前
*/
private void lessEqual() throws ParseException {
String createdAt = "2018-11-23 10:30:00";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date createdAtDate = sdf.parse(createdAt);
BmobDate bmobCreatedAtDate = new BmobDate(createdAtDate);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.addWhereLessThanOrEqualTo("createdAt", bmobCreatedAtDate);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnEqual, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnEqual, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 某个时间及以前
*/
private void lessEqual() throws ParseException {
String createdAt = "2018-11-23 10:30:00";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date createdAtDate = sdf.parse(createdAt);
BmobDate bmobCreatedAtDate = new BmobDate(createdAtDate);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.addWhereLessThanOrEqualTo("createdAt", bmobCreatedAtDate);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnEqual, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnEqual, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 复合查询:与查询,查询序列大于等于5并且小于等于10的类别
*/
private void compoundAnd() {
BmobQuery categoryBmobQueryStart = new BmobQuery<>();
categoryBmobQueryStart.addWhereGreaterThanOrEqualTo("sequence", 5);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereLessThanOrEqualTo("sequence", 10);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);
queries.add(categoryBmobQueryStart);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.and(queries);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnCount, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnCount, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 复合查询:与查询,查询序列大于等于5并且小于等于10的类别
*/
private void compoundAnd() {
BmobQuery categoryBmobQueryStart = new BmobQuery<>();
categoryBmobQueryStart.addWhereGreaterThanOrEqualTo("sequence", 5);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereLessThanOrEqualTo("sequence", 10);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);
queries.add(categoryBmobQueryStart);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.and(queries);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnCount, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnCount, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 复合查询:或查询,查询序列小于等于5或者大于等于10的类别
*/
private void compoundOr() {
BmobQuery categoryBmobQueryStart = new BmobQuery<>();
categoryBmobQueryStart.addWhereLessThanOrEqualTo("sequence", 5);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereGreaterThanOrEqualTo("sequence", 10);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);
queries.add(categoryBmobQueryStart);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.or(queries);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnCount, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnCount, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
categoryBmobQueryStart.addWhereGreaterThanOrEqualTo("createdAt", bmobCreatedAtDateStart);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereLessThanOrEqualTo("createdAt", bmobCreatedAtDateEnd);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);
代码示例来源:origin: bmob/bmob-android-sdk-demo
/**
* 复合查询:或查询,查询序列小于等于5或者大于等于10的类别
*/
private void compoundOr() {
BmobQuery categoryBmobQueryStart = new BmobQuery<>();
categoryBmobQueryStart.addWhereLessThanOrEqualTo("sequence", 5);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereGreaterThanOrEqualTo("sequence", 10);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);
queries.add(categoryBmobQueryStart);
BmobQuery categoryBmobQuery = new BmobQuery<>();
categoryBmobQuery.or(queries);
categoryBmobQuery.findObjects(new FindListener() {
@Override
public void done(List object, BmobException e) {
if (e == null) {
Snackbar.make(mBtnCount, "查询成功:" + object.size(), Snackbar.LENGTH_LONG).show();
} else {
Log.e("BMOB", e.toString());
Snackbar.make(mBtnCount, e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}
});
}
代码示例来源:origin: bmob/bmob-android-sdk-demo
categoryBmobQueryStart.addWhereGreaterThanOrEqualTo("createdAt", bmobCreatedAtDateStart);
BmobQuery categoryBmobQueryEnd = new BmobQuery<>();
categoryBmobQueryEnd.addWhereLessThanOrEqualTo("createdAt", bmobCreatedAtDateEnd);
List> queries = new ArrayList<>();
queries.add(categoryBmobQueryStart);