本文整理了Java中com.mongodb.client.model.Filters.nin()
方法的一些代码示例,展示了Filters.nin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filters.nin()
方法的具体详情如下:
包路径:com.mongodb.client.model.Filters
类名称:Filters
方法名:nin
[英]Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist.
[中]创建一个筛选器,该筛选器匹配字段值不等于任何指定值或不存在的所有文档。
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist.
*
* @param fieldName the field name
* @param values the list of values
* @param <TItem> the value type
* @return the filter
* @mongodb.driver.manual reference/operator/query/nin $nin
*/
public static <TItem> Bson nin(final String fieldName, final TItem... values) {
return nin(fieldName, asList(values));
}
代码示例来源:origin: org.mongodb/mongodb-driver-core
/**
* Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist.
*
* @param fieldName the field name
* @param values the list of values
* @param <TItem> the value type
* @return the filter
* @mongodb.driver.manual reference/operator/query/nin $nin
*/
public static <TItem> Bson nin(final String fieldName, final TItem... values) {
return nin(fieldName, asList(values));
}
代码示例来源:origin: com.holon-platform.mongo/holon-datastore-mongo-core
@Override
public <T> BsonFilterExpression visit(NotInFilter<T> filter, MongoResolutionContext<?> context) {
return resolveOperationQueryFilter(context, filter,
(c, fn) -> Filters.nin(fn, resolveRightOperandAsIterable(filter, context)));
}
代码示例来源:origin: org.opencb.commons/commons-datastore-mongodb
&& queryParamsOperatorAlwaysMatchesOperator(type, queryParamList, ComparisonOperator.NOT_EQUALS)) {
return Filters.nin(mongoDbField, removeOperatorsFromQueryParamList(type, queryParamList));
} else {
List<Bson> bsonList = new ArrayList<>(queryParamList.size());
代码示例来源:origin: org.opencb.commons/commons-datastore-mongodb
break;
case NOT_IN:
filter = Filters.nin(mongoDbField, queryValues);
break;
case ALL:
代码示例来源:origin: opencb/opencga
queriesExisting.add(and(bson, nin(STUDIES_FIELD + "." + FILES_FIELD + "." + FILEID_FIELD, fileIds)));
代码示例来源:origin: opencb/opencga
eq(STUDYID_FIELD, studyId),
nin(FILES_FIELD + '.' + FILEID_FIELD, otherIndexedFiles)
代码示例来源:origin: org.axonframework/axon-mongo
cursor = eventCollection.find(and(gte(eventConfiguration.timestampProperty(),
formatInstant(trackingToken.getTimestamp().minus(lookBackTime))),
nin(eventConfiguration.eventIdentifierProperty(),
trackingToken.getKnownEventIds())));
代码示例来源:origin: org.axonframework.extensions.mongo/axon-mongo
cursor = eventCollection.find(and(gte(eventConfiguration.timestampProperty(),
formatInstant(trackingToken.getTimestamp().minus(lookBackTime))),
nin(eventConfiguration.eventIdentifierProperty(),
trackingToken.getKnownEventIds())));
内容来源于网络,如有侵权,请联系作者删除!