本文整理了Java中com.google.datastore.v1.Query.getFilter
方法的一些代码示例,展示了Query.getFilter
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getFilter
方法的具体详情如下:
包路径:com.google.datastore.v1.Query
类名称:Query
方法名:getFilter
[英]```
The filter to apply.
`.google.datastore.v1.Filter filter = 4;`
[中]```
The filter to apply.
.google.datastore.v1.Filter filter = 4;
代码示例来源:origin: googleapis/google-cloud-java
/**
*
*
* <pre>
* The filter to apply.
* </pre>
*
* <code>.google.datastore.v1.Filter filter = 4;</code>
*/
public com.google.datastore.v1.FilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
代码示例来源:origin: googleapis/google-cloud-java
output.writeMessage(4, getFilter());
代码示例来源:origin: googleapis/google-cloud-java
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getFilter());
代码示例来源:origin: googleapis/google-cloud-java
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.datastore.v1.Query)) {
return super.equals(obj);
}
com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj;
boolean result = true;
result = result && getProjectionList().equals(other.getProjectionList());
result = result && getKindList().equals(other.getKindList());
result = result && (hasFilter() == other.hasFilter());
if (hasFilter()) {
result = result && getFilter().equals(other.getFilter());
}
result = result && getOrderList().equals(other.getOrderList());
result = result && getDistinctOnList().equals(other.getDistinctOnList());
result = result && getStartCursor().equals(other.getStartCursor());
result = result && getEndCursor().equals(other.getEndCursor());
result = result && (getOffset() == other.getOffset());
result = result && (hasLimit() == other.hasLimit());
if (hasLimit()) {
result = result && getLimit().equals(other.getLimit());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: googleapis/google-cloud-java
mergeFilter(other.getFilter());
代码示例来源:origin: googleapis/google-cloud-java
hash = (53 * hash) + getFilter().hashCode();
代码示例来源:origin: googleapis/google-cloud-java
Filter currFilter = Filter.fromPb(queryPb.getFilter());
if (currFilter != null) {
setFilter(currFilter);
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
/**
* <pre>
* The filter to apply.
* </pre>
*
* <code>optional .google.datastore.v1.Filter filter = 4;</code>
*/
public com.google.datastore.v1.FilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
/**
*
*
* <pre>
* The filter to apply.
* </pre>
*
* <code>.google.datastore.v1.Filter filter = 4;</code>
*/
public com.google.datastore.v1.FilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getFilter());
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < projection_.size(); i++) {
output.writeMessage(2, projection_.get(i));
}
for (int i = 0; i < kind_.size(); i++) {
output.writeMessage(3, kind_.get(i));
}
if (filter_ != null) {
output.writeMessage(4, getFilter());
}
for (int i = 0; i < order_.size(); i++) {
output.writeMessage(5, order_.get(i));
}
for (int i = 0; i < distinctOn_.size(); i++) {
output.writeMessage(6, distinctOn_.get(i));
}
if (!startCursor_.isEmpty()) {
output.writeBytes(7, startCursor_);
}
if (!endCursor_.isEmpty()) {
output.writeBytes(8, endCursor_);
}
if (offset_ != 0) {
output.writeInt32(10, offset_);
}
if (limit_ != null) {
output.writeMessage(12, getLimit());
}
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
output.writeMessage(4, getFilter());
代码示例来源:origin: GoogleCloudPlatform/google-cloud-datastore
/**
* Verifies that the given query can be properly scattered.
*
* @param query the query to verify
* @throws IllegalArgumentException if the query is invalid.
*/
private void validateQuery(Query query) throws IllegalArgumentException {
if (query.getKindCount() != 1) {
throw new IllegalArgumentException("Query must have exactly one kind.");
}
if (query.getOrderCount() != 0) {
throw new IllegalArgumentException("Query cannot have any sort orders.");
}
if (query.hasFilter()) {
validateFilter(query.getFilter());
}
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-proto-client
/**
* Verifies that the given query can be properly scattered.
*
* @param query the query to verify
* @throws IllegalArgumentException if the query is invalid.
*/
private void validateQuery(Query query) throws IllegalArgumentException {
if (query.getKindCount() != 1) {
throw new IllegalArgumentException("Query must have exactly one kind.");
}
if (query.getOrderCount() != 0) {
throw new IllegalArgumentException("Query cannot have any sort orders.");
}
if (query.hasFilter()) {
validateFilter(query.getFilter());
}
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-proto-client
/**
* Create a new {@link Query} given the query and range.
*
* @param lastKey the previous key. If null then assumed to be the beginning.
* @param nextKey the next key. If null then assumed to be the end.
* @param query the desired query.
*/
private Query createSplit(Key lastKey, Key nextKey, Query query) {
if (lastKey == null && nextKey == null) {
return query;
}
List<Filter> keyFilters = new ArrayList<Filter>();
if (query.hasFilter()) {
keyFilters.add(query.getFilter());
}
if (lastKey != null) {
Filter lowerBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
PropertyFilter.Operator.GREATER_THAN_OR_EQUAL,
DatastoreHelper.makeValue(lastKey)).build();
keyFilters.add(lowerBound);
}
if (nextKey != null) {
Filter upperBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
PropertyFilter.Operator.LESS_THAN,
DatastoreHelper.makeValue(nextKey)).build();
keyFilters.add(upperBound);
}
return Query.newBuilder(query).setFilter(makeAndFilter(keyFilters)).build();
}
代码示例来源:origin: GoogleCloudPlatform/google-cloud-datastore
/**
* Create a new {@link Query} given the query and range.
*
* @param lastKey the previous key. If null then assumed to be the beginning.
* @param nextKey the next key. If null then assumed to be the end.
* @param query the desired query.
*/
private Query createSplit(Key lastKey, Key nextKey, Query query) {
if (lastKey == null && nextKey == null) {
return query;
}
List<Filter> keyFilters = new ArrayList<Filter>();
if (query.hasFilter()) {
keyFilters.add(query.getFilter());
}
if (lastKey != null) {
Filter lowerBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
PropertyFilter.Operator.GREATER_THAN_OR_EQUAL,
DatastoreHelper.makeValue(lastKey)).build();
keyFilters.add(lowerBound);
}
if (nextKey != null) {
Filter upperBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
PropertyFilter.Operator.LESS_THAN,
DatastoreHelper.makeValue(nextKey)).build();
keyFilters.add(upperBound);
}
return Query.newBuilder(query).setFilter(makeAndFilter(keyFilters)).build();
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.datastore.v1.Query)) {
return super.equals(obj);
}
com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj;
boolean result = true;
result = result && getProjectionList().equals(other.getProjectionList());
result = result && getKindList().equals(other.getKindList());
result = result && (hasFilter() == other.hasFilter());
if (hasFilter()) {
result = result && getFilter().equals(other.getFilter());
}
result = result && getOrderList().equals(other.getOrderList());
result = result && getDistinctOnList().equals(other.getDistinctOnList());
result = result && getStartCursor().equals(other.getStartCursor());
result = result && getEndCursor().equals(other.getEndCursor());
result = result && (getOffset() == other.getOffset());
result = result && (hasLimit() == other.hasLimit());
if (hasLimit()) {
result = result && getLimit().equals(other.getLimit());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
hash = (53 * hash) + getFilter().hashCode();
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
result = result && (hasFilter() == other.hasFilter());
if (hasFilter()) {
result = result && getFilter()
.equals(other.getFilter());
代码示例来源:origin: com.google.cloud/google-cloud-datastore
Filter currFilter = Filter.fromPb(queryPb.getFilter());
if (currFilter != null) {
setFilter(currFilter);
内容来源于网络,如有侵权,请联系作者删除!